passenger 5.1.12 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +18 -1
- data/Rakefile +4 -1
- data/build/agent.rb +2 -2
- data/build/apache2.rb +17 -10
- data/build/basics.rb +18 -4
- data/build/common_library.rb +7 -3
- data/build/cxx_tests.rb +2 -7
- data/build/misc.rb +3 -1
- data/build/nginx.rb +11 -5
- data/build/oxt_tests.rb +0 -3
- data/build/packaging.rb +3 -2
- data/build/schema_printer.rb +103 -0
- data/build/support/cplusplus.rb +2 -2
- data/build/support/cxx_dependency_map.rb +2575 -868
- data/dev/ci/lib/functions.sh +1 -1
- data/dev/ci/lib/set-container-envvars.sh +1 -1
- data/dev/ci/lib/setup-container.sh +1 -1
- data/dev/ci/run-tests-natively +1 -1
- data/dev/ci/run-tests-with-docker +1 -1
- data/dev/ci/scripts/debug-console-wrapper.sh +1 -1
- data/dev/ci/scripts/docker-entrypoint-stage2.sh +1 -1
- data/dev/ci/scripts/docker-entrypoint.sh +1 -1
- data/dev/ci/scripts/inituidgid +1 -1
- data/dev/ci/scripts/run-tests-natively-stage2.sh +1 -1
- data/dev/ci/scripts/setup-host-natively.sh +1 -1
- data/dev/ci/setup-host +1 -1
- data/dev/ci/tests/apache2/run +1 -1
- data/dev/ci/tests/apache2/setup +1 -1
- data/dev/ci/tests/cxx/run +1 -1
- data/dev/ci/tests/cxx/setup +1 -1
- data/dev/ci/tests/debian/Jenkinsfile +0 -1
- data/dev/ci/tests/debian/run +1 -1
- data/dev/ci/tests/nginx-dynamic/run +1 -1
- data/dev/ci/tests/nginx-dynamic/setup +1 -1
- data/dev/ci/tests/nginx/run +1 -1
- data/dev/ci/tests/nginx/setup +1 -1
- data/dev/ci/tests/nodejs/run +1 -1
- data/dev/ci/tests/nodejs/setup +1 -1
- data/dev/ci/tests/rpm/run +1 -1
- data/dev/ci/tests/ruby/run +1 -1
- data/dev/ci/tests/ruby/setup +1 -1
- data/dev/ci/tests/source-packaging/run +1 -1
- data/dev/ci/tests/source-packaging/setup +1 -1
- data/dev/ci/tests/standalone/run +1 -1
- data/dev/ci/tests/standalone/setup +1 -1
- data/dev/configkit-schemas/index.json +1708 -0
- data/dev/configkit-schemas/update_schema_inline_comments.rb +118 -0
- data/dev/copy_boost_headers +13 -1
- data/dev/index_cxx_dependencies.rb +20 -7
- data/dev/vagrant/provision.sh +1 -1
- data/resources/mime.types +1 -0
- data/resources/templates/standalone/http.erb +1 -6
- data/src/agent/Core/AdminPanelConnector.h +550 -0
- data/src/agent/Core/ApiServer.h +159 -97
- data/src/agent/Core/ApplicationPool/Group.h +2 -0
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +109 -0
- data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -3
- data/src/agent/Core/ApplicationPool/Options.h +5 -6
- data/src/agent/Core/ApplicationPool/Pool.h +59 -2
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +3 -3
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +2 -2
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +6 -0
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +129 -0
- data/src/agent/Core/Config.h +475 -0
- data/src/agent/Core/ConfigChange.cpp +349 -0
- data/src/agent/Core/ConfigChange.h +54 -0
- data/src/agent/Core/Controller.h +35 -3
- data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
- data/src/agent/Core/Controller/Config.cpp +0 -2
- data/src/agent/Core/Controller/Config.h +168 -104
- data/src/agent/Core/Controller/ForwardResponse.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +14 -15
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +34 -44
- data/src/agent/Core/Controller/Request.h +0 -1
- data/src/agent/Core/CoreMain.cpp +236 -349
- data/src/agent/Core/OptionParser.h +75 -89
- data/src/agent/Core/SecurityUpdateChecker.h +263 -100
- data/src/agent/Core/SpawningKit/Config.h +6 -2
- data/src/agent/Core/SpawningKit/Spawner.h +0 -45
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -0
- data/src/agent/Shared/ApiAccountUtils.h +318 -0
- data/src/agent/Shared/ApiServerUtils.h +3 -104
- data/src/agent/Shared/Fundamentals/Initialization.cpp +81 -44
- data/src/agent/Shared/Fundamentals/Initialization.h +12 -7
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +21 -0
- data/src/agent/Watchdog/AgentWatcher.cpp +1 -1
- data/src/agent/Watchdog/ApiServer.h +100 -14
- data/src/agent/Watchdog/Config.h +340 -0
- data/src/agent/Watchdog/CoreWatcher.cpp +27 -13
- data/src/agent/Watchdog/InstanceDirToucher.cpp +1 -1
- data/src/agent/Watchdog/WatchdogMain.cpp +190 -206
- data/src/apache2_module/Bucket.cpp +4 -0
- data/src/apache2_module/Bucket.h +7 -3
- data/src/apache2_module/CBindings.cpp +49 -0
- data/src/apache2_module/Config.cpp +242 -0
- data/src/apache2_module/Config.h +109 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +485 -0
- data/src/apache2_module/{ConfigurationCommands.cpp.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder} +29 -15
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +298 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +171 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +854 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +188 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +610 -0
- data/src/apache2_module/ConfigGeneral/SetterFuncs.h +65 -0
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +174 -0
- data/src/apache2_module/{MergeDirConfig.cpp.cxxcodebuilder → DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder} +54 -32
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +113 -0
- data/src/apache2_module/{SetHeaders.cpp.cxxcodebuilder → DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder} +34 -23
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +426 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +165 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +269 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +148 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +534 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +230 -0
- data/src/apache2_module/DirectoryMapper.h +19 -16
- data/src/apache2_module/Hooks.cpp +124 -138
- data/src/apache2_module/Hooks.h +9 -14
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +263 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +152 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +299 -0
- data/src/apache2_module/{ConfigurationFields.hpp.cxxcodebuilder → ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder} +105 -18
- data/src/apache2_module/Utils.h +215 -0
- data/src/apache2_module/mod_passenger.c +16 -8
- data/src/cxx_supportlib/AppTypes.h +2 -0
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
- data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +8 -8
- data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +7 -41
- data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +12 -66
- data/src/cxx_supportlib/ConfigKit/Schema.h +62 -11
- data/src/cxx_supportlib/ConfigKit/{ValidationUtils.h → SchemaUtils.h} +12 -3
- data/src/cxx_supportlib/ConfigKit/Store.h +17 -9
- data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +2 -1
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +13 -70
- data/src/cxx_supportlib/ConfigKit/Translator.h +125 -0
- data/src/cxx_supportlib/Constants.h +1 -3
- data/src/cxx_supportlib/FileTools/FileManip.cpp +297 -0
- data/src/cxx_supportlib/FileTools/FileManip.h +162 -0
- data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.cpp +6 -3
- data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.h +7 -5
- data/src/cxx_supportlib/FileTools/PathManip.cpp +240 -0
- data/src/cxx_supportlib/FileTools/PathManip.h +91 -0
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +62 -0
- data/src/{apache2_module/Configuration.h → cxx_supportlib/FileTools/PathManipCBindings.h} +12 -19
- data/src/cxx_supportlib/Hooks.h +19 -16
- data/src/cxx_supportlib/InstanceDirectory.h +11 -0
- data/src/cxx_supportlib/JsonTools/Autocast.h +79 -0
- data/src/cxx_supportlib/JsonTools/CBindings.cpp +364 -0
- data/src/cxx_supportlib/JsonTools/CBindings.h +101 -0
- data/src/cxx_supportlib/LoggingKit/Config.h +13 -0
- data/src/cxx_supportlib/LoggingKit/Context.h +5 -2
- data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +12 -4
- data/src/cxx_supportlib/ResourceLocator.h +15 -0
- data/src/cxx_supportlib/ServerKit/Config.h +156 -0
- data/src/cxx_supportlib/ServerKit/Context.h +59 -38
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +2 -2
- data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -2
- data/src/cxx_supportlib/ServerKit/Server.h +32 -15
- data/src/cxx_supportlib/Utils.cpp +0 -441
- data/src/cxx_supportlib/Utils.h +0 -158
- data/src/cxx_supportlib/Utils/Curl.h +1 -0
- data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +1 -0
- data/src/cxx_supportlib/Utils/StrIntUtilsNoStrictAliasing.cpp +2 -0
- data/src/cxx_supportlib/Utils/VariantMap.h +31 -0
- data/src/cxx_supportlib/WatchdogLauncher.cpp +7 -79
- data/src/cxx_supportlib/WatchdogLauncher.h +50 -53
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +981 -0
- data/src/cxx_supportlib/oxt/macros.hpp +9 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/COPYING +145 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/changelog.md +342 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/readme.md +49 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/base64/base64.hpp +178 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/client.hpp +33 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/close.hpp +342 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio.hpp +131 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio_ssl.hpp +39 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/chrono.hpp +68 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/connection_hdl.hpp +52 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/cpp11.hpp +162 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/functional.hpp +105 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/md5.hpp +448 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/memory.hpp +89 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/network.hpp +106 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/platforms.hpp +46 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/random.hpp +82 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/regex.hpp +59 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/stdint.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/system_error.hpp +84 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/thread.hpp +84 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/time.hpp +56 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/type_traits.hpp +65 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/basic.hpp +46 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/none.hpp +80 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_client.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls_client.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/boost_config.hpp +72 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core.hpp +285 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core_client.hpp +294 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug.hpp +286 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio_no_tls.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_client.hpp +72 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_server.hpp +312 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection.hpp +1651 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection_base.hpp +38 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint.hpp +700 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint_base.hpp +38 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/error.hpp +277 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/extension.hpp +102 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/disabled.hpp +128 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/enabled.hpp +752 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/frame.hpp +861 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/constants.hpp +308 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/parser.hpp +196 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/request.hpp +191 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/response.hpp +266 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/parser.hpp +619 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/request.hpp +124 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/response.hpp +188 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/connection_impl.hpp +2372 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/endpoint_impl.hpp +269 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/utilities_impl.hpp +87 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/basic.hpp +199 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/levels.hpp +203 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/stub.hpp +119 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/syslog.hpp +146 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/alloc.hpp +105 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/message.hpp +340 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/pool.hpp +229 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/base.hpp +299 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi00.hpp +462 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi07.hpp +78 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi08.hpp +83 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi13.hpp +1056 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/processor.hpp +407 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/none.hpp +60 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/random_device.hpp +80 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/client_endpoint.hpp +173 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/server_endpoint.hpp +190 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/server.hpp +33 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/sha1/sha1.hpp +189 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/base.hpp +232 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/connection.hpp +1204 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/endpoint.hpp +1147 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/base.hpp +159 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/none.hpp +370 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/tls.hpp +484 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/connection.hpp +238 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/endpoint.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/base.hpp +104 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/connection.hpp +412 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/endpoint.hpp +140 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/base.hpp +133 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/connection.hpp +714 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/endpoint.hpp +222 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/base.hpp +95 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/connection.hpp +286 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/endpoint.hpp +140 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/uri.hpp +355 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utf8_validator.hpp +154 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utilities.hpp +182 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/version.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +951 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +520 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +258 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +942 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +567 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +697 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +1519 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +1137 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +288 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +569 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +854 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +371 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +521 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +2241 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +246 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +260 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +238 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +483 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +825 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +330 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/datagram_socket_service.hpp +438 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer_service.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/addressof.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +491 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +385 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +192 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +1050 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +294 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +229 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +119 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +208 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +244 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +85 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/function.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +161 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +480 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +333 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +453 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +432 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +688 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +167 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +307 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +498 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +126 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +210 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +153 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +269 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +315 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +190 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +649 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +3470 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.ipp +476 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +222 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/limits.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +500 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +148 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +216 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +158 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +81 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +324 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +236 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +138 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +108 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +460 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +452 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +170 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +123 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +133 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +81 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +221 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +146 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/shared_ptr.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +218 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +336 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +318 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +410 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +144 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service.hpp +203 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_operation.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_thread_info.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +333 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +95 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +85 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/weak_ptr.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/win_iocp_serial_port_service.hpp +230 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +293 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +345 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +195 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +111 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +123 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +124 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +129 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_type.hpp +114 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +360 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +340 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +432 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +79 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.hpp +156 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.ipp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +755 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +812 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +1149 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +556 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +355 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +767 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +827 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +772 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +202 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +243 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +248 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +265 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +262 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +246 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +141 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +206 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +571 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +228 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +300 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +193 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_service.hpp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +113 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +106 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +492 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +364 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor_service.hpp +262 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/raw_socket_service.hpp +438 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +633 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +666 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +925 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/seq_packet_socket_service.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +169 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_service.hpp +255 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_service.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_acceptor_service.hpp +308 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +522 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/basic_context.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +789 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +194 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_service.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +112 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +327 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +351 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +115 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1177 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +168 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/basic_context.hpp +436 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/context_service.hpp +176 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_context_service.hpp +396 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_operation.hpp +526 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_stream_service.hpp +573 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream.hpp +503 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream_service.hpp +186 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +758 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_service.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +254 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/stream_socket_service.hpp +382 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +88 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +94 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/waitable_timer_service.hpp +170 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_handle.hpp +283 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +378 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +361 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle_service.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +118 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle_service.hpp +222 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle_service.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +620 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +672 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono_io.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/chrono.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +242 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp +356 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/thread_clock.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/chrono.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp +354 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/thread_clock.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/process_cpu_clocks.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/thread_clock.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +163 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/floor.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/include.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +593 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +295 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +317 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_style.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +1003 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/ios_base_state.hpp +152 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_get.hpp +330 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +1243 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_put.hpp +261 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_units.hpp +260 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/timezone.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +437 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/manip_base.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +637 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/process_cpu_clocks.hpp +525 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/round.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/thread_clock.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/chrono/chrono.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/ratio.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +460 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/integer_log2.hpp +112 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/integer_mask.hpp +126 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/static_min_max.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/chrono.cpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/process_cpu_clocks.cpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/thread_clock.cpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +250 -0
- data/src/cxx_supportlib/vendor-modified/boost/pointer_cast.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/random.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/additive_combine.hpp +283 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/bernoulli_distribution.hpp +197 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +184 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +434 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/cauchy_distribution.hpp +214 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/chi_squared_distribution.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/auto_link.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/config.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/const_mod.hpp +216 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/disable_warnings.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/enable_warnings.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_bits.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_seed_seq.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/int_float_pair.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/integer_log2.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/iterator_mixin.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/large_arithmetic.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/operators.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/polynomial.hpp +384 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/ptr_helper.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed.hpp +115 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed_impl.hpp +398 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/signed_unsigned_tools.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/uniform_int_float.hpp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/vector_io.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/discard_block.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +636 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/exponential_distribution.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/extreme_value_distribution.hpp +177 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/fisher_f_distribution.hpp +183 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/gamma_distribution.hpp +292 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/generate_canonical.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/geometric_distribution.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +883 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/independent_bits.hpp +271 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/inversive_congruential.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/lagged_fibonacci.hpp +537 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/laplace_distribution.hpp +175 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/linear_congruential.hpp +466 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/linear_feedback_shift.hpp +217 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/lognormal_distribution.hpp +254 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +682 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/negative_binomial_distribution.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/non_central_chi_squared_distribution.hpp +221 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/normal_distribution.hpp +374 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_constant_distribution.hpp +466 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_linear_distribution.hpp +531 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/poisson_distribution.hpp +360 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/random_device.hpp +143 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/random_number_generator.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/ranlux.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +118 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_order.hpp +269 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_output.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/student_t_distribution.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/subtract_with_carry.hpp +613 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/taus88.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/traits.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/triangle_distribution.hpp +232 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_01.hpp +257 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +419 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_on_sphere.hpp +284 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real_distribution.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_smallint.hpp +307 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/variate_generator.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/weibull_distribution.hpp +177 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/xor_combine.hpp +208 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/ratio_io.hpp +1342 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/include.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/abs.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/arithmetic.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/comparison.hpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/divides.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/equal_to.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/gcd.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater_equal.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/lcm.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less_equal.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/minus.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/negate.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/not_equal_to.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/numeric_cast.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_c_tag.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_constant.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/sign.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/times.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_io.hpp +1076 -0
- data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1002 -0
- data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +11 -0
- data/src/helper-scripts/rack-preloader.rb +1 -1
- data/src/nginx_module/{ConfigurationCommands.c → ConfigGeneral/AutoGeneratedDefinitions.c} +351 -134
- data/src/nginx_module/{ConfigurationCommands.c.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder} +14 -25
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +396 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +160 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +831 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +168 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +887 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +100 -0
- data/src/nginx_module/Configuration.c +165 -621
- data/src/nginx_module/Configuration.h +43 -33
- data/src/nginx_module/ContentHandler.c +46 -40
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +282 -0
- data/src/nginx_module/{CreateLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder} +43 -17
- data/src/nginx_module/{CacheLocationConfig.c → LocationConfig/AutoGeneratedHeaderSerialization.c} +148 -180
- data/src/nginx_module/{CacheLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder} +13 -11
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +595 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +190 -0
- data/src/nginx_module/{MergeLocationConfig.c → LocationConfig/AutoGeneratedMergeFunction.c} +32 -42
- data/src/nginx_module/{MergeLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder} +18 -11
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +220 -0
- data/src/nginx_module/{LocationConfig.h.cxxcodebuilder → LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder} +70 -48
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +163 -0
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +125 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +303 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +173 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +133 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +154 -0
- data/src/nginx_module/config +13 -4
- data/src/nginx_module/ngx_http_passenger_module.c +154 -84
- data/src/ruby_supportlib/phusion_passenger.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +613 -131
- data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +52 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +18 -4
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +104 -0
- data/src/ruby_supportlib/phusion_passenger/constants.rb +0 -2
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +470 -138
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +17 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +11 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +293 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +8 -54
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -5
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +4 -7
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +1 -1
- data/src/schema_printer/SchemaPrinterMain.cpp +78 -0
- data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +116 -0
- metadata +671 -30
- data/src/apache2_module/Configuration.cpp +0 -737
- data/src/apache2_module/Configuration.hpp +0 -274
- data/src/apache2_module/ConfigurationCommands.cpp +0 -199
- data/src/apache2_module/ConfigurationFields.hpp +0 -187
- data/src/apache2_module/ConfigurationSetters.cpp +0 -436
- data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +0 -144
- data/src/apache2_module/CreateDirConfig.cpp +0 -68
- data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +0 -81
- data/src/apache2_module/MergeDirConfig.cpp +0 -155
- data/src/apache2_module/SetHeaders.cpp +0 -111
- data/src/nginx_module/CreateLocationConfig.c +0 -100
- data/src/nginx_module/LocationConfig.h +0 -95
@@ -0,0 +1,96 @@
|
|
1
|
+
/* boost random/generate_canonical.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Steven Watanabe 2011
|
4
|
+
* Distributed under the Boost Software License, Version 1.0. (See
|
5
|
+
* accompanying file LICENSE_1_0.txt or copy at
|
6
|
+
* http://www.boost.org/LICENSE_1_0.txt)
|
7
|
+
*
|
8
|
+
* See http://www.boost.org for most recent version including documentation.
|
9
|
+
*
|
10
|
+
* $Id$
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
#ifndef BOOST_RANDOM_GENERATE_CANONICAL_HPP
|
15
|
+
#define BOOST_RANDOM_GENERATE_CANONICAL_HPP
|
16
|
+
|
17
|
+
#include <algorithm>
|
18
|
+
#include <boost/assert.hpp>
|
19
|
+
#include <boost/config/no_tr1/cmath.hpp>
|
20
|
+
#include <boost/limits.hpp>
|
21
|
+
#include <boost/type_traits/is_integral.hpp>
|
22
|
+
#include <boost/mpl/bool.hpp>
|
23
|
+
#include <boost/random/detail/signed_unsigned_tools.hpp>
|
24
|
+
#include <boost/random/detail/generator_bits.hpp>
|
25
|
+
|
26
|
+
namespace boost {
|
27
|
+
namespace random {
|
28
|
+
|
29
|
+
namespace detail {
|
30
|
+
|
31
|
+
template<class RealType, std::size_t bits, class URNG>
|
32
|
+
RealType generate_canonical_impl(URNG& g, boost::mpl::true_ /*is_integral*/)
|
33
|
+
{
|
34
|
+
using std::pow;
|
35
|
+
typedef typename URNG::result_type base_result;
|
36
|
+
std::size_t digits = std::numeric_limits<RealType>::digits;
|
37
|
+
RealType R = RealType((g.max)()) - RealType((g.min)()) + 1;
|
38
|
+
RealType mult = R;
|
39
|
+
RealType limit =
|
40
|
+
pow(RealType(2),
|
41
|
+
RealType((std::min)(static_cast<std::size_t>(bits), digits)));
|
42
|
+
RealType S = RealType(detail::subtract<base_result>()(g(), (g.min)()));
|
43
|
+
while(mult < limit) {
|
44
|
+
RealType inc = RealType(detail::subtract<base_result>()(g(), (g.min)()));
|
45
|
+
S += inc * mult;
|
46
|
+
mult *= R;
|
47
|
+
}
|
48
|
+
return S / mult;
|
49
|
+
}
|
50
|
+
|
51
|
+
template<class RealType, std::size_t bits, class URNG>
|
52
|
+
RealType generate_canonical_impl(URNG& g, boost::mpl::false_ /*is_integral*/)
|
53
|
+
{
|
54
|
+
using std::pow;
|
55
|
+
using std::floor;
|
56
|
+
BOOST_ASSERT((g.min)() == 0);
|
57
|
+
BOOST_ASSERT((g.max)() == 1);
|
58
|
+
std::size_t digits = std::numeric_limits<RealType>::digits;
|
59
|
+
std::size_t engine_bits = detail::generator_bits<URNG>::value();
|
60
|
+
std::size_t b = (std::min)(bits, digits);
|
61
|
+
RealType R = pow(RealType(2), RealType(engine_bits));
|
62
|
+
RealType mult = R;
|
63
|
+
RealType limit = pow(RealType(2), RealType(b));
|
64
|
+
RealType S = RealType(g() - (g.min)());
|
65
|
+
while(mult < limit) {
|
66
|
+
RealType inc(floor((RealType(g()) - RealType((g.min)())) * R));
|
67
|
+
S += inc * mult;
|
68
|
+
mult *= R;
|
69
|
+
}
|
70
|
+
return S / mult;
|
71
|
+
}
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Returns a value uniformly distributed in the range [0, 1)
|
77
|
+
* with at least @c bits random bits.
|
78
|
+
*/
|
79
|
+
template<class RealType, std::size_t bits, class URNG>
|
80
|
+
RealType generate_canonical(URNG& g)
|
81
|
+
{
|
82
|
+
RealType result = detail::generate_canonical_impl<RealType, bits>(
|
83
|
+
g, boost::random::traits::is_integral<typename URNG::result_type>());
|
84
|
+
BOOST_ASSERT(result >= 0);
|
85
|
+
BOOST_ASSERT(result <= 1);
|
86
|
+
if(result == 1) {
|
87
|
+
result -= std::numeric_limits<RealType>::epsilon() / 2;
|
88
|
+
BOOST_ASSERT(result != 1);
|
89
|
+
}
|
90
|
+
return result;
|
91
|
+
}
|
92
|
+
|
93
|
+
} // namespace random
|
94
|
+
} // namespace boost
|
95
|
+
|
96
|
+
#endif // BOOST_RANDOM_GENERATE_CANONICAL_HPP
|
@@ -0,0 +1,267 @@
|
|
1
|
+
/* boost random/geometric_distribution.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Jens Maurer 2000-2001
|
4
|
+
* Copyright Steven Watanabe 2011
|
5
|
+
* Distributed under the Boost Software License, Version 1.0. (See
|
6
|
+
* accompanying file LICENSE_1_0.txt or copy at
|
7
|
+
* http://www.boost.org/LICENSE_1_0.txt)
|
8
|
+
*
|
9
|
+
* See http://www.boost.org for most recent version including documentation.
|
10
|
+
*
|
11
|
+
* $Id$
|
12
|
+
*
|
13
|
+
* Revision history
|
14
|
+
* 2001-02-18 moved to individual header files
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifndef BOOST_RANDOM_GEOMETRIC_DISTRIBUTION_HPP
|
18
|
+
#define BOOST_RANDOM_GEOMETRIC_DISTRIBUTION_HPP
|
19
|
+
|
20
|
+
#include <boost/config/no_tr1/cmath.hpp> // std::log
|
21
|
+
#include <iosfwd>
|
22
|
+
#include <ios>
|
23
|
+
#include <boost/assert.hpp>
|
24
|
+
#include <boost/random/detail/config.hpp>
|
25
|
+
#include <boost/random/detail/operators.hpp>
|
26
|
+
#include <boost/random/uniform_01.hpp>
|
27
|
+
|
28
|
+
namespace boost {
|
29
|
+
namespace random {
|
30
|
+
|
31
|
+
/**
|
32
|
+
* An instantiation of the class template @c geometric_distribution models
|
33
|
+
* a \random_distribution. The distribution produces positive
|
34
|
+
* integers which are the number of bernoulli trials
|
35
|
+
* with probability @c p required to get one that fails.
|
36
|
+
*
|
37
|
+
* For the geometric distribution, \f$p(i) = p(1-p)^{i}\f$.
|
38
|
+
*
|
39
|
+
* @xmlwarning
|
40
|
+
* This distribution has been updated to match the C++ standard.
|
41
|
+
* Its behavior has changed from the original
|
42
|
+
* boost::geometric_distribution. A backwards compatible
|
43
|
+
* wrapper is provided in namespace boost.
|
44
|
+
* @endxmlwarning
|
45
|
+
*/
|
46
|
+
template<class IntType = int, class RealType = double>
|
47
|
+
class geometric_distribution
|
48
|
+
{
|
49
|
+
public:
|
50
|
+
typedef RealType input_type;
|
51
|
+
typedef IntType result_type;
|
52
|
+
|
53
|
+
class param_type
|
54
|
+
{
|
55
|
+
public:
|
56
|
+
|
57
|
+
typedef geometric_distribution distribution_type;
|
58
|
+
|
59
|
+
/** Constructs the parameters with p. */
|
60
|
+
explicit param_type(RealType p_arg = RealType(0.5))
|
61
|
+
: _p(p_arg)
|
62
|
+
{
|
63
|
+
BOOST_ASSERT(RealType(0) < _p && _p < RealType(1));
|
64
|
+
}
|
65
|
+
|
66
|
+
/** Returns the p parameter of the distribution. */
|
67
|
+
RealType p() const { return _p; }
|
68
|
+
|
69
|
+
/** Writes the parameters to a std::ostream. */
|
70
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
|
71
|
+
{
|
72
|
+
os << parm._p;
|
73
|
+
return os;
|
74
|
+
}
|
75
|
+
|
76
|
+
/** Reads the parameters from a std::istream. */
|
77
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
|
78
|
+
{
|
79
|
+
double p_in;
|
80
|
+
if(is >> p_in) {
|
81
|
+
if(p_in > RealType(0) && p_in < RealType(1)) {
|
82
|
+
parm._p = p_in;
|
83
|
+
} else {
|
84
|
+
is.setstate(std::ios_base::failbit);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
return is;
|
88
|
+
}
|
89
|
+
|
90
|
+
/** Returns true if the two sets of parameters are equal. */
|
91
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
|
92
|
+
{ return lhs._p == rhs._p; }
|
93
|
+
|
94
|
+
/** Returns true if the two sets of parameters are different. */
|
95
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
|
96
|
+
|
97
|
+
|
98
|
+
private:
|
99
|
+
RealType _p;
|
100
|
+
};
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Contructs a new geometric_distribution with the paramter @c p.
|
104
|
+
*
|
105
|
+
* Requires: 0 < p < 1
|
106
|
+
*/
|
107
|
+
explicit geometric_distribution(const RealType& p_arg = RealType(0.5))
|
108
|
+
: _p(p_arg)
|
109
|
+
{
|
110
|
+
BOOST_ASSERT(RealType(0) < _p && _p < RealType(1));
|
111
|
+
init();
|
112
|
+
}
|
113
|
+
|
114
|
+
/** Constructs a new geometric_distribution from its parameters. */
|
115
|
+
explicit geometric_distribution(const param_type& parm)
|
116
|
+
: _p(parm.p())
|
117
|
+
{
|
118
|
+
init();
|
119
|
+
}
|
120
|
+
|
121
|
+
// compiler-generated copy ctor and assignment operator are fine
|
122
|
+
|
123
|
+
/** Returns: the distribution parameter @c p */
|
124
|
+
RealType p() const { return _p; }
|
125
|
+
|
126
|
+
/** Returns the smallest value that the distribution can produce. */
|
127
|
+
IntType min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return IntType(0); }
|
128
|
+
|
129
|
+
/** Returns the largest value that the distribution can produce. */
|
130
|
+
IntType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
131
|
+
{ return (std::numeric_limits<IntType>::max)(); }
|
132
|
+
|
133
|
+
/** Returns the parameters of the distribution. */
|
134
|
+
param_type param() const { return param_type(_p); }
|
135
|
+
|
136
|
+
/** Sets the parameters of the distribution. */
|
137
|
+
void param(const param_type& parm)
|
138
|
+
{
|
139
|
+
_p = parm.p();
|
140
|
+
init();
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Effects: Subsequent uses of the distribution do not depend
|
145
|
+
* on values produced by any engine prior to invoking reset.
|
146
|
+
*/
|
147
|
+
void reset() { }
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Returns a random variate distributed according to the
|
151
|
+
* geometric_distribution.
|
152
|
+
*/
|
153
|
+
template<class Engine>
|
154
|
+
result_type operator()(Engine& eng) const
|
155
|
+
{
|
156
|
+
using std::log;
|
157
|
+
using std::floor;
|
158
|
+
RealType x = RealType(1) - boost::uniform_01<RealType>()(eng);
|
159
|
+
return IntType(floor(log(x) / _log_1mp));
|
160
|
+
}
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Returns a random variate distributed according to the
|
164
|
+
* geometric distribution with parameters specified by param.
|
165
|
+
*/
|
166
|
+
template<class Engine>
|
167
|
+
result_type operator()(Engine& eng, const param_type& parm) const
|
168
|
+
{ return geometric_distribution(parm)(eng); }
|
169
|
+
|
170
|
+
/** Writes the distribution to a @c std::ostream. */
|
171
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, geometric_distribution, gd)
|
172
|
+
{
|
173
|
+
os << gd._p;
|
174
|
+
return os;
|
175
|
+
}
|
176
|
+
|
177
|
+
/** Reads the distribution from a @c std::istream. */
|
178
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, geometric_distribution, gd)
|
179
|
+
{
|
180
|
+
param_type parm;
|
181
|
+
if(is >> parm) {
|
182
|
+
gd.param(parm);
|
183
|
+
}
|
184
|
+
return is;
|
185
|
+
}
|
186
|
+
|
187
|
+
/**
|
188
|
+
* Returns true if the two distributions will produce identical
|
189
|
+
* sequences of values given equal generators.
|
190
|
+
*/
|
191
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(geometric_distribution, lhs, rhs)
|
192
|
+
{ return lhs._p == rhs._p; }
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Returns true if the two distributions may produce different
|
196
|
+
* sequences of values given equal generators.
|
197
|
+
*/
|
198
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(geometric_distribution)
|
199
|
+
|
200
|
+
private:
|
201
|
+
|
202
|
+
/// \cond show_private
|
203
|
+
|
204
|
+
void init()
|
205
|
+
{
|
206
|
+
using std::log;
|
207
|
+
_log_1mp = log(1 - _p);
|
208
|
+
}
|
209
|
+
|
210
|
+
RealType _p;
|
211
|
+
RealType _log_1mp;
|
212
|
+
|
213
|
+
/// \endcond
|
214
|
+
};
|
215
|
+
|
216
|
+
} // namespace random
|
217
|
+
|
218
|
+
/// \cond show_deprecated
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Provided for backwards compatibility. This class is
|
222
|
+
* deprecated. It provides the old behavior of geometric_distribution
|
223
|
+
* with \f$p(i) = (1-p) p^{i-1}\f$.
|
224
|
+
*/
|
225
|
+
template<class IntType = int, class RealType = double>
|
226
|
+
class geometric_distribution
|
227
|
+
{
|
228
|
+
public:
|
229
|
+
typedef RealType input_type;
|
230
|
+
typedef IntType result_type;
|
231
|
+
|
232
|
+
explicit geometric_distribution(RealType p_arg = RealType(0.5))
|
233
|
+
: _impl(1 - p_arg) {}
|
234
|
+
|
235
|
+
RealType p() const { return 1 - _impl.p(); }
|
236
|
+
|
237
|
+
void reset() {}
|
238
|
+
|
239
|
+
template<class Engine>
|
240
|
+
IntType operator()(Engine& eng) const { return _impl(eng) + IntType(1); }
|
241
|
+
|
242
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, geometric_distribution, gd)
|
243
|
+
{
|
244
|
+
os << gd.p();
|
245
|
+
return os;
|
246
|
+
}
|
247
|
+
|
248
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, geometric_distribution, gd)
|
249
|
+
{
|
250
|
+
RealType val;
|
251
|
+
if(is >> val) {
|
252
|
+
typename impl_type::param_type impl_param(1 - val);
|
253
|
+
gd._impl.param(impl_param);
|
254
|
+
}
|
255
|
+
return is;
|
256
|
+
}
|
257
|
+
|
258
|
+
private:
|
259
|
+
typedef random::geometric_distribution<IntType, RealType> impl_type;
|
260
|
+
impl_type _impl;
|
261
|
+
};
|
262
|
+
|
263
|
+
/// \endcond
|
264
|
+
|
265
|
+
} // namespace boost
|
266
|
+
|
267
|
+
#endif // BOOST_RANDOM_GEOMETRIC_DISTRIBUTION_HPP
|
@@ -0,0 +1,883 @@
|
|
1
|
+
/* boost random/hyperexponential_distribution.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Marco Guazzone 2014
|
4
|
+
* Distributed under the Boost Software License, Version 1.0. (See
|
5
|
+
* accompanying file LICENSE_1_0.txt or copy at
|
6
|
+
* http://www.boost.org/LICENSE_1_0.txt)
|
7
|
+
*
|
8
|
+
* See http://www.boost.org for most recent version including documentation.
|
9
|
+
*
|
10
|
+
* Much of the code here taken by boost::math::hyperexponential_distribution.
|
11
|
+
* To this end, we would like to thank Paul Bristow and John Maddock for their
|
12
|
+
* valuable feedback.
|
13
|
+
*
|
14
|
+
* \author Marco Guazzone (marco.guazzone@gmail.com)
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifndef BOOST_RANDOM_HYPEREXPONENTIAL_DISTRIBUTION_HPP
|
18
|
+
#define BOOST_RANDOM_HYPEREXPONENTIAL_DISTRIBUTION_HPP
|
19
|
+
|
20
|
+
|
21
|
+
#include <boost/config.hpp>
|
22
|
+
#include <boost/math/special_functions/fpclassify.hpp>
|
23
|
+
#include <boost/random/detail/operators.hpp>
|
24
|
+
#include <boost/random/detail/vector_io.hpp>
|
25
|
+
#include <boost/random/discrete_distribution.hpp>
|
26
|
+
#include <boost/random/exponential_distribution.hpp>
|
27
|
+
#include <boost/range/begin.hpp>
|
28
|
+
#include <boost/range/end.hpp>
|
29
|
+
#include <boost/range/size.hpp>
|
30
|
+
#include <boost/type_traits/has_pre_increment.hpp>
|
31
|
+
#include <cassert>
|
32
|
+
#include <cmath>
|
33
|
+
#include <cstddef>
|
34
|
+
#include <iterator>
|
35
|
+
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
36
|
+
# include <initializer_list>
|
37
|
+
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
38
|
+
#include <iostream>
|
39
|
+
#include <limits>
|
40
|
+
#include <numeric>
|
41
|
+
#include <vector>
|
42
|
+
|
43
|
+
|
44
|
+
namespace boost { namespace random {
|
45
|
+
|
46
|
+
namespace hyperexp_detail {
|
47
|
+
|
48
|
+
template <typename T>
|
49
|
+
std::vector<T>& normalize(std::vector<T>& v)
|
50
|
+
{
|
51
|
+
if (v.size() == 0)
|
52
|
+
{
|
53
|
+
return v;
|
54
|
+
}
|
55
|
+
|
56
|
+
const T sum = std::accumulate(v.begin(), v.end(), static_cast<T>(0));
|
57
|
+
T final_sum = 0;
|
58
|
+
|
59
|
+
const typename std::vector<T>::iterator end = --v.end();
|
60
|
+
for (typename std::vector<T>::iterator it = v.begin();
|
61
|
+
it != end;
|
62
|
+
++it)
|
63
|
+
{
|
64
|
+
*it /= sum;
|
65
|
+
final_sum += *it;
|
66
|
+
}
|
67
|
+
*end = 1-final_sum; // avoids round off errors thus ensuring the probabilities really sum to 1
|
68
|
+
|
69
|
+
return v;
|
70
|
+
}
|
71
|
+
|
72
|
+
template <typename RealT>
|
73
|
+
bool check_probabilities(std::vector<RealT> const& probabilities)
|
74
|
+
{
|
75
|
+
const std::size_t n = probabilities.size();
|
76
|
+
RealT sum = 0;
|
77
|
+
for (std::size_t i = 0; i < n; ++i)
|
78
|
+
{
|
79
|
+
if (probabilities[i] < 0
|
80
|
+
|| probabilities[i] > 1
|
81
|
+
|| !(boost::math::isfinite)(probabilities[i]))
|
82
|
+
{
|
83
|
+
return false;
|
84
|
+
}
|
85
|
+
sum += probabilities[i];
|
86
|
+
}
|
87
|
+
|
88
|
+
//NOTE: the check below seems to fail on some architectures.
|
89
|
+
// So we commented it.
|
90
|
+
//// - We try to keep phase probabilities correctly normalized in the distribution constructors
|
91
|
+
//// - However in practice we have to allow for a very slight divergence from a sum of exactly 1:
|
92
|
+
////if (std::abs(sum-1) > (std::numeric_limits<RealT>::epsilon()*2))
|
93
|
+
//// This is from Knuth "The Art of Computer Programming: Vol.2, 3rd Ed", and can be used to
|
94
|
+
//// check is two numbers are approximately equal
|
95
|
+
//const RealT one = 1;
|
96
|
+
//const RealT tol = std::numeric_limits<RealT>::epsilon()*2.0;
|
97
|
+
//if (std::abs(sum-one) > (std::max(std::abs(sum), std::abs(one))*tol))
|
98
|
+
//{
|
99
|
+
// return false;
|
100
|
+
//}
|
101
|
+
|
102
|
+
return true;
|
103
|
+
}
|
104
|
+
|
105
|
+
template <typename RealT>
|
106
|
+
bool check_rates(std::vector<RealT> const& rates)
|
107
|
+
{
|
108
|
+
const std::size_t n = rates.size();
|
109
|
+
for (std::size_t i = 0; i < n; ++i)
|
110
|
+
{
|
111
|
+
if (rates[i] <= 0
|
112
|
+
|| !(boost::math::isfinite)(rates[i]))
|
113
|
+
{
|
114
|
+
return false;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
return true;
|
118
|
+
}
|
119
|
+
|
120
|
+
template <typename RealT>
|
121
|
+
bool check_params(std::vector<RealT> const& probabilities, std::vector<RealT> const& rates)
|
122
|
+
{
|
123
|
+
if (probabilities.size() != rates.size())
|
124
|
+
{
|
125
|
+
return false;
|
126
|
+
}
|
127
|
+
|
128
|
+
return check_probabilities(probabilities)
|
129
|
+
&& check_rates(rates);
|
130
|
+
}
|
131
|
+
|
132
|
+
} // Namespace hyperexp_detail
|
133
|
+
|
134
|
+
|
135
|
+
/**
|
136
|
+
* The hyperexponential distribution is a real-valued continuous distribution
|
137
|
+
* with two parameters, the <em>phase probability vector</em> \c probs and the
|
138
|
+
* <em>rate vector</em> \c rates.
|
139
|
+
*
|
140
|
+
* A \f$k\f$-phase hyperexponential distribution is a mixture of \f$k\f$
|
141
|
+
* exponential distributions.
|
142
|
+
* For this reason, it is also referred to as <em>mixed exponential
|
143
|
+
* distribution</em> or <em>parallel \f$k\f$-phase exponential
|
144
|
+
* distribution</em>.
|
145
|
+
*
|
146
|
+
* A \f$k\f$-phase hyperexponential distribution is characterized by two
|
147
|
+
* parameters, namely a <em>phase probability vector</em> \f$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)\f$ and a <em>rate vector</em> \f$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)\f$.
|
148
|
+
*
|
149
|
+
* A \f$k\f$-phase hyperexponential distribution is frequently used in
|
150
|
+
* <em>queueing theory</em> to model the distribution of the superposition of
|
151
|
+
* \f$k\f$ independent events, like, for instance, the service time distribution
|
152
|
+
* of a queueing station with \f$k\f$ servers in parallel where the \f$i\f$-th
|
153
|
+
* server is chosen with probability \f$\alpha_i\f$ and its service time
|
154
|
+
* distribution is an exponential distribution with rate \f$\lambda_i\f$
|
155
|
+
* (Allen,1990; Papadopolous et al.,1993; Trivedi,2002).
|
156
|
+
*
|
157
|
+
* For instance, CPUs service-time distribution in a computing system has often
|
158
|
+
* been observed to possess such a distribution (Rosin,1965).
|
159
|
+
* Also, the arrival of different types of customer to a single queueing station
|
160
|
+
* is often modeled as a hyperexponential distribution (Papadopolous et al.,1993).
|
161
|
+
* Similarly, if a product manufactured in several parallel assemply lines and
|
162
|
+
* the outputs are merged, the failure density of the overall product is likely
|
163
|
+
* to be hyperexponential (Trivedi,2002).
|
164
|
+
*
|
165
|
+
* Finally, since the hyperexponential distribution exhibits a high Coefficient
|
166
|
+
* of Variation (CoV), that is a CoV > 1, it is especially suited to fit
|
167
|
+
* empirical data with large CoV (Feitelson,2014; Wolski et al.,2013) and to
|
168
|
+
* approximate <em>long-tail probability distributions</em> (Feldmann et al.,1998).
|
169
|
+
*
|
170
|
+
* See (Boost,2014) for more information and examples.
|
171
|
+
*
|
172
|
+
* A \f$k\f$-phase hyperexponential distribution has a probability density
|
173
|
+
* function
|
174
|
+
* \f[
|
175
|
+
* f(x) = \sum_{i=1}^k \alpha_i \lambda_i e^{-x\lambda_i}
|
176
|
+
* \f]
|
177
|
+
* where:
|
178
|
+
* - \f$k\f$ is the <em>number of phases</em> and also the size of the input
|
179
|
+
* vector parameters,
|
180
|
+
* - \f$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)\f$ is the <em>phase probability
|
181
|
+
* vector</em> parameter, and
|
182
|
+
* - \f$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)\f$ is the <em>rate vector</em>
|
183
|
+
* parameter.
|
184
|
+
* .
|
185
|
+
*
|
186
|
+
* Given a \f$k\f$-phase hyperexponential distribution with phase probability
|
187
|
+
* vector \f$\mathbf{\alpha}\f$ and rate vector \f$\mathbf{\lambda}\f$, the
|
188
|
+
* random variate generation algorithm consists of the following steps (Tyszer,1999):
|
189
|
+
* -# Generate a random variable \f$U\f$ uniformly distribution on the interval \f$(0,1)\f$.
|
190
|
+
* -# Use \f$U\f$ to select the appropriate \f$\lambda_i\f$ (e.g., the
|
191
|
+
* <em>alias method</em> can possibly be used for this step).
|
192
|
+
* -# Generate an exponentially distributed random variable \f$X\f$ with rate parameter \f$\lambda_i\f$.
|
193
|
+
* -# Return \f$X\f$.
|
194
|
+
* .
|
195
|
+
*
|
196
|
+
* References:
|
197
|
+
* -# A.O. Allen, <em>Probability, Statistics, and Queuing Theory with Computer Science Applications, Second Edition</em>, Academic Press, 1990.
|
198
|
+
* -# Boost C++ Libraries, <em>Boost.Math / Statistical Distributions: Hyperexponential Distribution</em>, Online: http://www.boost.org/doc/libs/release/libs/math/doc/html/dist.html , 2014.
|
199
|
+
* -# D.G. Feitelson, <em>Workload Modeling for Computer Systems Performance Evaluation</em>, Cambridge University Press, 2014
|
200
|
+
* -# A. Feldmann and W. Whitt, <em>Fitting mixtures of exponentials to long-tail distributions to analyze network performance models</em>, Performance Evaluation 31(3-4):245, doi:10.1016/S0166-5316(97)00003-5, 1998.
|
201
|
+
* -# H.T. Papadopolous, C. Heavey and J. Browne, <em>Queueing Theory in Manufacturing Systems Analysis and Design</em>, Chapman & Hall/CRC, 1993, p. 35.
|
202
|
+
* -# R.F. Rosin, <em>Determining a computing center environment</em>, Communications of the ACM 8(7):463-468, 1965.
|
203
|
+
* -# K.S. Trivedi, <em>Probability and Statistics with Reliability, Queueing, and Computer Science Applications</em>, John Wiley & Sons, Inc., 2002.
|
204
|
+
* -# J. Tyszer, <em>Object-Oriented Computer Simulation of Discrete-Event Systems</em>, Springer, 1999.
|
205
|
+
* -# Wikipedia, <em>Hyperexponential Distribution</em>, Online: http://en.wikipedia.org/wiki/Hyperexponential_distribution , 2014.
|
206
|
+
* -# Wolfram Mathematica, <em>Hyperexponential Distribution</em>, Online: http://reference.wolfram.com/language/ref/HyperexponentialDistribution.html , 2014.
|
207
|
+
* .
|
208
|
+
*
|
209
|
+
* \author Marco Guazzone (marco.guazzone@gmail.com)
|
210
|
+
*/
|
211
|
+
template<class RealT = double>
|
212
|
+
class hyperexponential_distribution
|
213
|
+
{
|
214
|
+
public: typedef RealT result_type;
|
215
|
+
public: typedef RealT input_type;
|
216
|
+
|
217
|
+
|
218
|
+
/**
|
219
|
+
* The parameters of a hyperexponential distribution.
|
220
|
+
*
|
221
|
+
* Stores the <em>phase probability vector</em> and the <em>rate vector</em>
|
222
|
+
* of the hyperexponential distribution.
|
223
|
+
*
|
224
|
+
* \author Marco Guazzone (marco.guazzone@gmail.com)
|
225
|
+
*/
|
226
|
+
public: class param_type
|
227
|
+
{
|
228
|
+
public: typedef hyperexponential_distribution distribution_type;
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Constructs a \c param_type with the default parameters
|
232
|
+
* of the distribution.
|
233
|
+
*/
|
234
|
+
public: param_type()
|
235
|
+
: probs_(1, 1),
|
236
|
+
rates_(1, 1)
|
237
|
+
{
|
238
|
+
}
|
239
|
+
|
240
|
+
/**
|
241
|
+
* Constructs a \c param_type from the <em>phase probability vector</em>
|
242
|
+
* and <em>rate vector</em> parameters of the distribution.
|
243
|
+
*
|
244
|
+
* The <em>phase probability vector</em> parameter is given by the range
|
245
|
+
* defined by [\a prob_first, \a prob_last) iterator pair, and the
|
246
|
+
* <em>rate vector</em> parameter is given by the range defined by
|
247
|
+
* [\a rate_first, \a rate_last) iterator pair.
|
248
|
+
*
|
249
|
+
* \tparam ProbIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
250
|
+
* \tparam RateIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
251
|
+
*
|
252
|
+
* \param prob_first The iterator to the beginning of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
253
|
+
* \param prob_last The iterator to the ending of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
254
|
+
* \param rate_first The iterator to the beginning of the range of non-negative real elements representing the rates.
|
255
|
+
* \param rate_last The iterator to the ending of the range of non-negative real elements representing the rates.
|
256
|
+
*
|
257
|
+
* References:
|
258
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
259
|
+
* .
|
260
|
+
*/
|
261
|
+
public: template <typename ProbIterT, typename RateIterT>
|
262
|
+
param_type(ProbIterT prob_first, ProbIterT prob_last,
|
263
|
+
RateIterT rate_first, RateIterT rate_last)
|
264
|
+
: probs_(prob_first, prob_last),
|
265
|
+
rates_(rate_first, rate_last)
|
266
|
+
{
|
267
|
+
hyperexp_detail::normalize(probs_);
|
268
|
+
|
269
|
+
assert( hyperexp_detail::check_params(probs_, rates_) );
|
270
|
+
}
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Constructs a \c param_type from the <em>phase probability vector</em>
|
274
|
+
* and <em>rate vector</em> parameters of the distribution.
|
275
|
+
*
|
276
|
+
* The <em>phase probability vector</em> parameter is given by the range
|
277
|
+
* defined by \a prob_range, and the <em>rate vector</em> parameter is
|
278
|
+
* given by the range defined by \a rate_range.
|
279
|
+
*
|
280
|
+
* \tparam ProbRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
281
|
+
* \tparam RateRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
282
|
+
*
|
283
|
+
* \param prob_range The range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
284
|
+
* \param rate_range The range of positive real elements representing the rates.
|
285
|
+
*
|
286
|
+
* \note
|
287
|
+
* The final \c disable_if parameter is an implementation detail that
|
288
|
+
* differentiates between this two argument constructor and the
|
289
|
+
* iterator-based two argument constructor described below.
|
290
|
+
*/
|
291
|
+
// We SFINAE this out of existance if either argument type is
|
292
|
+
// incrementable as in that case the type is probably an iterator:
|
293
|
+
public: template <typename ProbRangeT, typename RateRangeT>
|
294
|
+
param_type(ProbRangeT const& prob_range,
|
295
|
+
RateRangeT const& rate_range,
|
296
|
+
typename boost::disable_if_c<boost::has_pre_increment<ProbRangeT>::value || boost::has_pre_increment<RateRangeT>::value>::type* = 0)
|
297
|
+
: probs_(boost::begin(prob_range), boost::end(prob_range)),
|
298
|
+
rates_(boost::begin(rate_range), boost::end(rate_range))
|
299
|
+
{
|
300
|
+
hyperexp_detail::normalize(probs_);
|
301
|
+
|
302
|
+
assert( hyperexp_detail::check_params(probs_, rates_) );
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Constructs a \c param_type from the <em>rate vector</em> parameter of
|
307
|
+
* the distribution and with equal phase probabilities.
|
308
|
+
*
|
309
|
+
* The <em>rate vector</em> parameter is given by the range defined by
|
310
|
+
* [\a rate_first, \a rate_last) iterator pair, and the <em>phase
|
311
|
+
* probability vector</em> parameter is set to the equal phase
|
312
|
+
* probabilities (i.e., to a vector of the same length \f$k\f$ of the
|
313
|
+
* <em>rate vector</em> and with each element set to \f$1.0/k\f$).
|
314
|
+
*
|
315
|
+
* \tparam RateIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
316
|
+
* \tparam RateIterT2 Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
317
|
+
*
|
318
|
+
* \param rate_first The iterator to the beginning of the range of non-negative real elements representing the rates.
|
319
|
+
* \param rate_last The iterator to the ending of the range of non-negative real elements representing the rates.
|
320
|
+
*
|
321
|
+
* \note
|
322
|
+
* The final \c disable_if parameter is an implementation detail that
|
323
|
+
* differentiates between this two argument constructor and the
|
324
|
+
* range-based two argument constructor described above.
|
325
|
+
*
|
326
|
+
* References:
|
327
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
328
|
+
* .
|
329
|
+
*/
|
330
|
+
// We SFINAE this out of existance if the argument type is
|
331
|
+
// incrementable as in that case the type is probably an iterator.
|
332
|
+
public: template <typename RateIterT>
|
333
|
+
param_type(RateIterT rate_first,
|
334
|
+
RateIterT rate_last,
|
335
|
+
typename boost::enable_if_c<boost::has_pre_increment<RateIterT>::value>::type* = 0)
|
336
|
+
: probs_(std::distance(rate_first, rate_last), 1), // will be normalized below
|
337
|
+
rates_(rate_first, rate_last)
|
338
|
+
{
|
339
|
+
assert(probs_.size() == rates_.size());
|
340
|
+
}
|
341
|
+
|
342
|
+
/**
|
343
|
+
* Constructs a @c param_type from the "rates" parameters
|
344
|
+
* of the distribution and with equal phase probabilities.
|
345
|
+
*
|
346
|
+
* The <em>rate vector</em> parameter is given by the range defined by
|
347
|
+
* \a rate_range, and the <em>phase probability vector</em> parameter is
|
348
|
+
* set to the equal phase probabilities (i.e., to a vector of the same
|
349
|
+
* length \f$k\f$ of the <em>rate vector</em> and with each element set
|
350
|
+
* to \f$1.0/k\f$).
|
351
|
+
*
|
352
|
+
* \tparam RateRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
353
|
+
*
|
354
|
+
* \param rate_range The range of positive real elements representing the rates.
|
355
|
+
*/
|
356
|
+
public: template <typename RateRangeT>
|
357
|
+
param_type(RateRangeT const& rate_range)
|
358
|
+
: probs_(boost::size(rate_range), 1), // Will be normalized below
|
359
|
+
rates_(boost::begin(rate_range), boost::end(rate_range))
|
360
|
+
{
|
361
|
+
hyperexp_detail::normalize(probs_);
|
362
|
+
|
363
|
+
assert( hyperexp_detail::check_params(probs_, rates_) );
|
364
|
+
}
|
365
|
+
|
366
|
+
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
367
|
+
/**
|
368
|
+
* Constructs a \c param_type from the <em>phase probability vector</em>
|
369
|
+
* and <em>rate vector</em> parameters of the distribution.
|
370
|
+
*
|
371
|
+
* The <em>phase probability vector</em> parameter is given by the
|
372
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
373
|
+
* defined by \a l1, and the <em>rate vector</em> parameter is given by the
|
374
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
375
|
+
* defined by \a l2.
|
376
|
+
*
|
377
|
+
* \param l1 The initializer list for inizializing the phase probability vector.
|
378
|
+
* \param l2 The initializer list for inizializing the rate vector.
|
379
|
+
*
|
380
|
+
* References:
|
381
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
382
|
+
* .
|
383
|
+
*/
|
384
|
+
public: param_type(std::initializer_list<RealT> l1, std::initializer_list<RealT> l2)
|
385
|
+
: probs_(l1.begin(), l1.end()),
|
386
|
+
rates_(l2.begin(), l2.end())
|
387
|
+
{
|
388
|
+
hyperexp_detail::normalize(probs_);
|
389
|
+
|
390
|
+
assert( hyperexp_detail::check_params(probs_, rates_) );
|
391
|
+
}
|
392
|
+
|
393
|
+
/**
|
394
|
+
* Constructs a \c param_type from the <em>rate vector</em> parameter
|
395
|
+
* of the distribution and with equal phase probabilities.
|
396
|
+
*
|
397
|
+
* The <em>rate vector</em> parameter is given by the
|
398
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
399
|
+
* defined by \a l1, and the <em>phase probability vector</em> parameter is
|
400
|
+
* set to the equal phase probabilities (i.e., to a vector of the same
|
401
|
+
* length \f$k\f$ of the <em>rate vector</em> and with each element set
|
402
|
+
* to \f$1.0/k\f$).
|
403
|
+
*
|
404
|
+
* \param l1 The initializer list for inizializing the rate vector.
|
405
|
+
*
|
406
|
+
* References:
|
407
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
408
|
+
* .
|
409
|
+
*/
|
410
|
+
public: param_type(std::initializer_list<RealT> l1)
|
411
|
+
: probs_(std::distance(l1.begin(), l1.end()), 1), // Will be normalized below
|
412
|
+
rates_(l1.begin(), l1.end())
|
413
|
+
{
|
414
|
+
hyperexp_detail::normalize(probs_);
|
415
|
+
|
416
|
+
assert( hyperexp_detail::check_params(probs_, rates_) );
|
417
|
+
}
|
418
|
+
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
419
|
+
|
420
|
+
/**
|
421
|
+
* Gets the <em>phase probability vector</em> parameter of the distribtuion.
|
422
|
+
*
|
423
|
+
* \return The <em>phase probability vector</em> parameter of the distribution.
|
424
|
+
*
|
425
|
+
* \note
|
426
|
+
* The returned probabilities are the normalized version of the ones
|
427
|
+
* passed at construction time.
|
428
|
+
*/
|
429
|
+
public: std::vector<RealT> probabilities() const
|
430
|
+
{
|
431
|
+
return probs_;
|
432
|
+
}
|
433
|
+
|
434
|
+
/**
|
435
|
+
* Gets the <em>rate vector</em> parameter of the distribtuion.
|
436
|
+
*
|
437
|
+
* \return The <em>rate vector</em> parameter of the distribution.
|
438
|
+
*/
|
439
|
+
public: std::vector<RealT> rates() const
|
440
|
+
{
|
441
|
+
return rates_;
|
442
|
+
}
|
443
|
+
|
444
|
+
/** Writes a \c param_type to a \c std::ostream. */
|
445
|
+
public: BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, param)
|
446
|
+
{
|
447
|
+
detail::print_vector(os, param.probs_);
|
448
|
+
os << ' ';
|
449
|
+
detail::print_vector(os, param.rates_);
|
450
|
+
|
451
|
+
return os;
|
452
|
+
}
|
453
|
+
|
454
|
+
/** Reads a \c param_type from a \c std::istream. */
|
455
|
+
public: BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, param)
|
456
|
+
{
|
457
|
+
// NOTE: if \c std::ios_base::exceptions is set, the code below may
|
458
|
+
// throw in case of a I/O failure.
|
459
|
+
// To prevent leaving the state of \c param inconsistent:
|
460
|
+
// - if an exception is thrown, the state of \c param is left
|
461
|
+
// unchanged (i.e., is the same as the one at the beginning
|
462
|
+
// of the function's execution), and
|
463
|
+
// - the state of \c param only after reading the whole input.
|
464
|
+
|
465
|
+
std::vector<RealT> probs;
|
466
|
+
std::vector<RealT> rates;
|
467
|
+
|
468
|
+
// Reads probability and rate vectors
|
469
|
+
detail::read_vector(is, probs);
|
470
|
+
if (!is)
|
471
|
+
{
|
472
|
+
return is;
|
473
|
+
}
|
474
|
+
is >> std::ws;
|
475
|
+
detail::read_vector(is, rates);
|
476
|
+
if (!is)
|
477
|
+
{
|
478
|
+
return is;
|
479
|
+
}
|
480
|
+
|
481
|
+
// Update the state of the param_type object
|
482
|
+
if (probs.size() > 0)
|
483
|
+
{
|
484
|
+
param.probs_.swap(probs);
|
485
|
+
probs.clear();
|
486
|
+
}
|
487
|
+
if (rates.size() > 0)
|
488
|
+
{
|
489
|
+
param.rates_.swap(rates);
|
490
|
+
rates.clear();
|
491
|
+
}
|
492
|
+
|
493
|
+
bool fail = false;
|
494
|
+
|
495
|
+
// Adjust vector sizes (if needed)
|
496
|
+
if (param.probs_.size() != param.rates_.size()
|
497
|
+
|| param.probs_.size() == 0)
|
498
|
+
{
|
499
|
+
fail = true;
|
500
|
+
|
501
|
+
const std::size_t np = param.probs_.size();
|
502
|
+
const std::size_t nr = param.rates_.size();
|
503
|
+
|
504
|
+
if (np > nr)
|
505
|
+
{
|
506
|
+
param.rates_.resize(np, 1);
|
507
|
+
}
|
508
|
+
else if (nr > np)
|
509
|
+
{
|
510
|
+
param.probs_.resize(nr, 1);
|
511
|
+
}
|
512
|
+
else
|
513
|
+
{
|
514
|
+
param.probs_.resize(1, 1);
|
515
|
+
param.rates_.resize(1, 1);
|
516
|
+
}
|
517
|
+
}
|
518
|
+
|
519
|
+
// Normalize probabilities
|
520
|
+
// NOTE: this cannot be done earlier since the probability vector
|
521
|
+
// can be changed due to size conformance
|
522
|
+
hyperexp_detail::normalize(param.probs_);
|
523
|
+
|
524
|
+
// Set the error state in the underlying stream in case of invalid input
|
525
|
+
if (fail)
|
526
|
+
{
|
527
|
+
// This throws an exception if ios_base::exception(failbit) is enabled
|
528
|
+
is.setstate(std::ios_base::failbit);
|
529
|
+
}
|
530
|
+
|
531
|
+
//post: vector size conformance
|
532
|
+
assert(param.probs_.size() == param.rates_.size());
|
533
|
+
|
534
|
+
return is;
|
535
|
+
}
|
536
|
+
|
537
|
+
/** Returns true if the two sets of parameters are the same. */
|
538
|
+
public: BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
|
539
|
+
{
|
540
|
+
return lhs.probs_ == rhs.probs_
|
541
|
+
&& lhs.rates_ == rhs.rates_;
|
542
|
+
}
|
543
|
+
|
544
|
+
/** Returns true if the two sets of parameters are the different. */
|
545
|
+
public: BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
|
546
|
+
|
547
|
+
|
548
|
+
private: std::vector<RealT> probs_; ///< The <em>phase probability vector</em> parameter of the distribution
|
549
|
+
private: std::vector<RealT> rates_; ///< The <em>rate vector</em> parameter of the distribution
|
550
|
+
}; // param_type
|
551
|
+
|
552
|
+
|
553
|
+
/**
|
554
|
+
* Constructs a 1-phase \c hyperexponential_distribution (i.e., an
|
555
|
+
* exponential distribution) with rate 1.
|
556
|
+
*/
|
557
|
+
public: hyperexponential_distribution()
|
558
|
+
: dd_(std::vector<RealT>(1, 1)),
|
559
|
+
rates_(1, 1)
|
560
|
+
{
|
561
|
+
// empty
|
562
|
+
}
|
563
|
+
|
564
|
+
/**
|
565
|
+
* Constructs a \c hyperexponential_distribution from the <em>phase
|
566
|
+
* probability vector</em> and <em>rate vector</em> parameters of the
|
567
|
+
* distribution.
|
568
|
+
*
|
569
|
+
* The <em>phase probability vector</em> parameter is given by the range
|
570
|
+
* defined by [\a prob_first, \a prob_last) iterator pair, and the
|
571
|
+
* <em>rate vector</em> parameter is given by the range defined by
|
572
|
+
* [\a rate_first, \a rate_last) iterator pair.
|
573
|
+
*
|
574
|
+
* \tparam ProbIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
575
|
+
* \tparam RateIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
576
|
+
*
|
577
|
+
* \param prob_first The iterator to the beginning of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
578
|
+
* \param prob_last The iterator to the ending of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
579
|
+
* \param rate_first The iterator to the beginning of the range of non-negative real elements representing the rates.
|
580
|
+
* \param rate_last The iterator to the ending of the range of non-negative real elements representing the rates.
|
581
|
+
*
|
582
|
+
* References:
|
583
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
584
|
+
* .
|
585
|
+
*/
|
586
|
+
public: template <typename ProbIterT, typename RateIterT>
|
587
|
+
hyperexponential_distribution(ProbIterT prob_first, ProbIterT prob_last,
|
588
|
+
RateIterT rate_first, RateIterT rate_last)
|
589
|
+
: dd_(prob_first, prob_last),
|
590
|
+
rates_(rate_first, rate_last)
|
591
|
+
{
|
592
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
593
|
+
}
|
594
|
+
|
595
|
+
/**
|
596
|
+
* Constructs a \c hyperexponential_distribution from the <em>phase
|
597
|
+
* probability vector</em> and <em>rate vector</em> parameters of the
|
598
|
+
* distribution.
|
599
|
+
*
|
600
|
+
* The <em>phase probability vector</em> parameter is given by the range
|
601
|
+
* defined by \a prob_range, and the <em>rate vector</em> parameter is
|
602
|
+
* given by the range defined by \a rate_range.
|
603
|
+
*
|
604
|
+
* \tparam ProbRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
605
|
+
* \tparam RateRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
606
|
+
*
|
607
|
+
* \param prob_range The range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized.
|
608
|
+
* \param rate_range The range of positive real elements representing the rates.
|
609
|
+
*
|
610
|
+
* \note
|
611
|
+
* The final \c disable_if parameter is an implementation detail that
|
612
|
+
* differentiates between this two argument constructor and the
|
613
|
+
* iterator-based two argument constructor described below.
|
614
|
+
*/
|
615
|
+
// We SFINAE this out of existance if either argument type is
|
616
|
+
// incrementable as in that case the type is probably an iterator:
|
617
|
+
public: template <typename ProbRangeT, typename RateRangeT>
|
618
|
+
hyperexponential_distribution(ProbRangeT const& prob_range,
|
619
|
+
RateRangeT const& rate_range,
|
620
|
+
typename boost::disable_if_c<boost::has_pre_increment<ProbRangeT>::value || boost::has_pre_increment<RateRangeT>::value>::type* = 0)
|
621
|
+
: dd_(prob_range),
|
622
|
+
rates_(boost::begin(rate_range), boost::end(rate_range))
|
623
|
+
{
|
624
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
625
|
+
}
|
626
|
+
|
627
|
+
/**
|
628
|
+
* Constructs a \c hyperexponential_distribution from the <em>rate
|
629
|
+
* vector</em> parameter of the distribution and with equal phase
|
630
|
+
* probabilities.
|
631
|
+
*
|
632
|
+
* The <em>rate vector</em> parameter is given by the range defined by
|
633
|
+
* [\a rate_first, \a rate_last) iterator pair, and the <em>phase
|
634
|
+
* probability vector</em> parameter is set to the equal phase
|
635
|
+
* probabilities (i.e., to a vector of the same length \f$k\f$ of the
|
636
|
+
* <em>rate vector</em> and with each element set to \f$1.0/k\f$).
|
637
|
+
*
|
638
|
+
* \tparam RateIterT Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
639
|
+
* \tparam RateIterT2 Must meet the requirements of \c InputIterator concept (ISO,2014,sec. 24.2.3 [input.iterators]).
|
640
|
+
*
|
641
|
+
* \param rate_first The iterator to the beginning of the range of non-negative real elements representing the rates.
|
642
|
+
* \param rate_last The iterator to the ending of the range of non-negative real elements representing the rates.
|
643
|
+
*
|
644
|
+
* \note
|
645
|
+
* The final \c disable_if parameter is an implementation detail that
|
646
|
+
* differentiates between this two argument constructor and the
|
647
|
+
* range-based two argument constructor described above.
|
648
|
+
*
|
649
|
+
* References:
|
650
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
651
|
+
* .
|
652
|
+
*/
|
653
|
+
// We SFINAE this out of existance if the argument type is
|
654
|
+
// incrementable as in that case the type is probably an iterator.
|
655
|
+
public: template <typename RateIterT>
|
656
|
+
hyperexponential_distribution(RateIterT rate_first,
|
657
|
+
RateIterT rate_last,
|
658
|
+
typename boost::enable_if_c<boost::has_pre_increment<RateIterT>::value>::type* = 0)
|
659
|
+
: dd_(std::vector<RealT>(std::distance(rate_first, rate_last), 1)),
|
660
|
+
rates_(rate_first, rate_last)
|
661
|
+
{
|
662
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
663
|
+
}
|
664
|
+
|
665
|
+
/**
|
666
|
+
* Constructs a @c param_type from the "rates" parameters
|
667
|
+
* of the distribution and with equal phase probabilities.
|
668
|
+
*
|
669
|
+
* The <em>rate vector</em> parameter is given by the range defined by
|
670
|
+
* \a rate_range, and the <em>phase probability vector</em> parameter is
|
671
|
+
* set to the equal phase probabilities (i.e., to a vector of the same
|
672
|
+
* length \f$k\f$ of the <em>rate vector</em> and with each element set
|
673
|
+
* to \f$1.0/k\f$).
|
674
|
+
*
|
675
|
+
* \tparam RateRangeT Must meet the requirements of <a href="boost:/libs/range/doc/html/range/concepts.html">Range</a> concept.
|
676
|
+
*
|
677
|
+
* \param rate_range The range of positive real elements representing the rates.
|
678
|
+
*/
|
679
|
+
public: template <typename RateRangeT>
|
680
|
+
hyperexponential_distribution(RateRangeT const& rate_range)
|
681
|
+
: dd_(std::vector<RealT>(boost::size(rate_range), 1)),
|
682
|
+
rates_(boost::begin(rate_range), boost::end(rate_range))
|
683
|
+
{
|
684
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
685
|
+
}
|
686
|
+
|
687
|
+
/**
|
688
|
+
* Constructs a \c hyperexponential_distribution from its parameters.
|
689
|
+
*
|
690
|
+
* \param param The parameters of the distribution.
|
691
|
+
*/
|
692
|
+
public: explicit hyperexponential_distribution(param_type const& param)
|
693
|
+
: dd_(param.probabilities()),
|
694
|
+
rates_(param.rates())
|
695
|
+
{
|
696
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
697
|
+
}
|
698
|
+
|
699
|
+
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
700
|
+
/**
|
701
|
+
* Constructs a \c hyperexponential_distribution from the <em>phase
|
702
|
+
* probability vector</em> and <em>rate vector</em> parameters of the
|
703
|
+
* distribution.
|
704
|
+
*
|
705
|
+
* The <em>phase probability vector</em> parameter is given by the
|
706
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
707
|
+
* defined by \a l1, and the <em>rate vector</em> parameter is given by the
|
708
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
709
|
+
* defined by \a l2.
|
710
|
+
*
|
711
|
+
* \param l1 The initializer list for inizializing the phase probability vector.
|
712
|
+
* \param l2 The initializer list for inizializing the rate vector.
|
713
|
+
*
|
714
|
+
* References:
|
715
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
716
|
+
* .
|
717
|
+
*/
|
718
|
+
public: hyperexponential_distribution(std::initializer_list<RealT> const& l1, std::initializer_list<RealT> const& l2)
|
719
|
+
: dd_(l1.begin(), l1.end()),
|
720
|
+
rates_(l2.begin(), l2.end())
|
721
|
+
{
|
722
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
723
|
+
}
|
724
|
+
|
725
|
+
/**
|
726
|
+
* Constructs a \c hyperexponential_distribution from the <em>rate
|
727
|
+
* vector</em> parameter of the distribution and with equal phase
|
728
|
+
* probabilities.
|
729
|
+
*
|
730
|
+
* The <em>rate vector</em> parameter is given by the
|
731
|
+
* <em>brace-init-list</em> (ISO,2014,sec. 8.5.4 [dcl.init.list])
|
732
|
+
* defined by \a l1, and the <em>phase probability vector</em> parameter is
|
733
|
+
* set to the equal phase probabilities (i.e., to a vector of the same
|
734
|
+
* length \f$k\f$ of the <em>rate vector</em> and with each element set
|
735
|
+
* to \f$1.0/k\f$).
|
736
|
+
*
|
737
|
+
* \param l1 The initializer list for inizializing the rate vector.
|
738
|
+
*
|
739
|
+
* References:
|
740
|
+
* -# ISO, <em>ISO/IEC 14882-2014: Information technology - Programming languages - C++</em>, 2014
|
741
|
+
* .
|
742
|
+
*/
|
743
|
+
public: hyperexponential_distribution(std::initializer_list<RealT> const& l1)
|
744
|
+
: dd_(std::vector<RealT>(std::distance(l1.begin(), l1.end()), 1)),
|
745
|
+
rates_(l1.begin(), l1.end())
|
746
|
+
{
|
747
|
+
assert( hyperexp_detail::check_params(dd_.probabilities(), rates_) );
|
748
|
+
}
|
749
|
+
#endif
|
750
|
+
|
751
|
+
/**
|
752
|
+
* Gets a random variate distributed according to the
|
753
|
+
* hyperexponential distribution.
|
754
|
+
*
|
755
|
+
* \tparam URNG Must meet the requirements of \uniform_random_number_generator.
|
756
|
+
*
|
757
|
+
* \param urng A uniform random number generator object.
|
758
|
+
*
|
759
|
+
* \return A random variate distributed according to the hyperexponential distribution.
|
760
|
+
*/
|
761
|
+
public: template<class URNG>\
|
762
|
+
RealT operator()(URNG& urng) const
|
763
|
+
{
|
764
|
+
const int i = dd_(urng);
|
765
|
+
|
766
|
+
return boost::random::exponential_distribution<RealT>(rates_[i])(urng);
|
767
|
+
}
|
768
|
+
|
769
|
+
/**
|
770
|
+
* Gets a random variate distributed according to the hyperexponential
|
771
|
+
* distribution with parameters specified by \c param.
|
772
|
+
*
|
773
|
+
* \tparam URNG Must meet the requirements of \uniform_random_number_generator.
|
774
|
+
*
|
775
|
+
* \param urng A uniform random number generator object.
|
776
|
+
* \param param A distribution parameter object.
|
777
|
+
*
|
778
|
+
* \return A random variate distributed according to the hyperexponential distribution.
|
779
|
+
* distribution with parameters specified by \c param.
|
780
|
+
*/
|
781
|
+
public: template<class URNG>
|
782
|
+
RealT operator()(URNG& urng, const param_type& param) const
|
783
|
+
{
|
784
|
+
return hyperexponential_distribution(param)(urng);
|
785
|
+
}
|
786
|
+
|
787
|
+
/** Returns the number of phases of the distribution. */
|
788
|
+
public: std::size_t num_phases() const
|
789
|
+
{
|
790
|
+
return rates_.size();
|
791
|
+
}
|
792
|
+
|
793
|
+
/** Returns the <em>phase probability vector</em> parameter of the distribution. */
|
794
|
+
public: std::vector<RealT> probabilities() const
|
795
|
+
{
|
796
|
+
return dd_.probabilities();
|
797
|
+
}
|
798
|
+
|
799
|
+
/** Returns the <em>rate vector</em> parameter of the distribution. */
|
800
|
+
public: std::vector<RealT> rates() const
|
801
|
+
{
|
802
|
+
return rates_;
|
803
|
+
}
|
804
|
+
|
805
|
+
/** Returns the smallest value that the distribution can produce. */
|
806
|
+
public: RealT min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
807
|
+
{
|
808
|
+
return 0;
|
809
|
+
}
|
810
|
+
|
811
|
+
/** Returns the largest value that the distribution can produce. */
|
812
|
+
public: RealT max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
813
|
+
{
|
814
|
+
return std::numeric_limits<RealT>::infinity();
|
815
|
+
}
|
816
|
+
|
817
|
+
/** Returns the parameters of the distribution. */
|
818
|
+
public: param_type param() const
|
819
|
+
{
|
820
|
+
std::vector<RealT> probs = dd_.probabilities();
|
821
|
+
|
822
|
+
return param_type(probs.begin(), probs.end(), rates_.begin(), rates_.end());
|
823
|
+
}
|
824
|
+
|
825
|
+
/** Sets the parameters of the distribution. */
|
826
|
+
public: void param(param_type const& param)
|
827
|
+
{
|
828
|
+
dd_.param(typename boost::random::discrete_distribution<int,RealT>::param_type(param.probabilities()));
|
829
|
+
rates_ = param.rates();
|
830
|
+
}
|
831
|
+
|
832
|
+
/**
|
833
|
+
* Effects: Subsequent uses of the distribution do not depend
|
834
|
+
* on values produced by any engine prior to invoking reset.
|
835
|
+
*/
|
836
|
+
public: void reset()
|
837
|
+
{
|
838
|
+
// empty
|
839
|
+
}
|
840
|
+
|
841
|
+
/** Writes an @c hyperexponential_distribution to a @c std::ostream. */
|
842
|
+
public: BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, hyperexponential_distribution, hd)
|
843
|
+
{
|
844
|
+
os << hd.param();
|
845
|
+
return os;
|
846
|
+
}
|
847
|
+
|
848
|
+
/** Reads an @c hyperexponential_distribution from a @c std::istream. */
|
849
|
+
public: BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, hyperexponential_distribution, hd)
|
850
|
+
{
|
851
|
+
param_type param;
|
852
|
+
if(is >> param)
|
853
|
+
{
|
854
|
+
hd.param(param);
|
855
|
+
}
|
856
|
+
return is;
|
857
|
+
}
|
858
|
+
|
859
|
+
/**
|
860
|
+
* Returns true if the two instances of @c hyperexponential_distribution will
|
861
|
+
* return identical sequences of values given equal generators.
|
862
|
+
*/
|
863
|
+
public: BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(hyperexponential_distribution, lhs, rhs)
|
864
|
+
{
|
865
|
+
return lhs.dd_ == rhs.dd_
|
866
|
+
&& lhs.rates_ == rhs.rates_;
|
867
|
+
}
|
868
|
+
|
869
|
+
/**
|
870
|
+
* Returns true if the two instances of @c hyperexponential_distribution will
|
871
|
+
* return different sequences of values given equal generators.
|
872
|
+
*/
|
873
|
+
public: BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(hyperexponential_distribution)
|
874
|
+
|
875
|
+
|
876
|
+
private: boost::random::discrete_distribution<int,RealT> dd_; ///< The \c discrete_distribution used to sample the phase probability and choose the rate
|
877
|
+
private: std::vector<RealT> rates_; ///< The <em>rate vector</em> parameter of the distribution
|
878
|
+
}; // hyperexponential_distribution
|
879
|
+
|
880
|
+
}} // namespace boost::random
|
881
|
+
|
882
|
+
|
883
|
+
#endif // BOOST_RANDOM_HYPEREXPONENTIAL_DISTRIBUTION_HPP
|