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,220 @@
|
|
1
|
+
/* boost random/negative_binomial_distribution.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Steven Watanabe 2010
|
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
|
+
#ifndef BOOST_RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_HPP_INCLUDED
|
14
|
+
#define BOOST_RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_HPP_INCLUDED
|
15
|
+
|
16
|
+
#include <iosfwd>
|
17
|
+
|
18
|
+
#include <boost/limits.hpp>
|
19
|
+
#include <boost/random/detail/config.hpp>
|
20
|
+
#include <boost/random/gamma_distribution.hpp>
|
21
|
+
#include <boost/random/poisson_distribution.hpp>
|
22
|
+
|
23
|
+
namespace boost {
|
24
|
+
namespace random {
|
25
|
+
|
26
|
+
/**
|
27
|
+
* The negative binomial distribution is an integer valued
|
28
|
+
* distribution with two parameters, @c k and @c p. The
|
29
|
+
* distribution produces non-negative values.
|
30
|
+
*
|
31
|
+
* The distribution function is
|
32
|
+
* \f$\displaystyle P(i) = {k+i-1\choose i}p^k(1-p)^i\f$.
|
33
|
+
*
|
34
|
+
* This implementation uses a gamma-poisson mixture.
|
35
|
+
*/
|
36
|
+
template<class IntType = int, class RealType = double>
|
37
|
+
class negative_binomial_distribution {
|
38
|
+
public:
|
39
|
+
typedef IntType result_type;
|
40
|
+
typedef RealType input_type;
|
41
|
+
|
42
|
+
class param_type {
|
43
|
+
public:
|
44
|
+
typedef negative_binomial_distribution distribution_type;
|
45
|
+
/**
|
46
|
+
* Construct a param_type object. @c k and @c p
|
47
|
+
* are the parameters of the distribution.
|
48
|
+
*
|
49
|
+
* Requires: k >=0 && 0 <= p <= 1
|
50
|
+
*/
|
51
|
+
explicit param_type(IntType k_arg = 1, RealType p_arg = RealType (0.5))
|
52
|
+
: _k(k_arg), _p(p_arg)
|
53
|
+
{}
|
54
|
+
/** Returns the @c k parameter of the distribution. */
|
55
|
+
IntType k() const { return _k; }
|
56
|
+
/** Returns the @c p parameter of the distribution. */
|
57
|
+
RealType p() const { return _p; }
|
58
|
+
#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
|
59
|
+
/** Writes the parameters of the distribution to a @c std::ostream. */
|
60
|
+
template<class CharT, class Traits>
|
61
|
+
friend std::basic_ostream<CharT,Traits>&
|
62
|
+
operator<<(std::basic_ostream<CharT,Traits>& os,
|
63
|
+
const param_type& parm)
|
64
|
+
{
|
65
|
+
os << parm._p << " " << parm._k;
|
66
|
+
return os;
|
67
|
+
}
|
68
|
+
|
69
|
+
/** Reads the parameters of the distribution from a @c std::istream. */
|
70
|
+
template<class CharT, class Traits>
|
71
|
+
friend std::basic_istream<CharT,Traits>&
|
72
|
+
operator>>(std::basic_istream<CharT,Traits>& is, param_type& parm)
|
73
|
+
{
|
74
|
+
is >> parm._p >> std::ws >> parm._k;
|
75
|
+
return is;
|
76
|
+
}
|
77
|
+
#endif
|
78
|
+
/** Returns true if the parameters have the same values. */
|
79
|
+
friend bool operator==(const param_type& lhs, const param_type& rhs)
|
80
|
+
{
|
81
|
+
return lhs._k == rhs._k && lhs._p == rhs._p;
|
82
|
+
}
|
83
|
+
/** Returns true if the parameters have different values. */
|
84
|
+
friend bool operator!=(const param_type& lhs, const param_type& rhs)
|
85
|
+
{
|
86
|
+
return !(lhs == rhs);
|
87
|
+
}
|
88
|
+
private:
|
89
|
+
IntType _k;
|
90
|
+
RealType _p;
|
91
|
+
};
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Construct a @c negative_binomial_distribution object. @c k and @c p
|
95
|
+
* are the parameters of the distribution.
|
96
|
+
*
|
97
|
+
* Requires: k >=0 && 0 <= p <= 1
|
98
|
+
*/
|
99
|
+
explicit negative_binomial_distribution(IntType k_arg = 1,
|
100
|
+
RealType p_arg = RealType(0.5))
|
101
|
+
: _k(k_arg), _p(p_arg)
|
102
|
+
{}
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Construct an @c negative_binomial_distribution object from the
|
106
|
+
* parameters.
|
107
|
+
*/
|
108
|
+
explicit negative_binomial_distribution(const param_type& parm)
|
109
|
+
: _k(parm.k()), _p(parm.p())
|
110
|
+
{}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Returns a random variate distributed according to the
|
114
|
+
* negative binomial distribution.
|
115
|
+
*/
|
116
|
+
template<class URNG>
|
117
|
+
IntType operator()(URNG& urng) const
|
118
|
+
{
|
119
|
+
gamma_distribution<RealType> gamma(_k, (1-_p)/_p);
|
120
|
+
poisson_distribution<IntType, RealType> poisson(gamma(urng));
|
121
|
+
return poisson(urng);
|
122
|
+
}
|
123
|
+
|
124
|
+
/**
|
125
|
+
* Returns a random variate distributed according to the negative
|
126
|
+
* binomial distribution with parameters specified by @c param.
|
127
|
+
*/
|
128
|
+
template<class URNG>
|
129
|
+
IntType operator()(URNG& urng, const param_type& parm) const
|
130
|
+
{
|
131
|
+
return negative_binomial_distribution(parm)(urng);
|
132
|
+
}
|
133
|
+
|
134
|
+
/** Returns the @c k parameter of the distribution. */
|
135
|
+
IntType k() const { return _k; }
|
136
|
+
/** Returns the @c p parameter of the distribution. */
|
137
|
+
RealType p() const { return _p; }
|
138
|
+
|
139
|
+
/** Returns the smallest value that the distribution can produce. */
|
140
|
+
IntType min BOOST_PREVENT_MACRO_SUBSTITUTION() const { return 0; }
|
141
|
+
/** Returns the largest value that the distribution can produce. */
|
142
|
+
IntType max BOOST_PREVENT_MACRO_SUBSTITUTION() const
|
143
|
+
{ return (std::numeric_limits<IntType>::max)(); }
|
144
|
+
|
145
|
+
/** Returns the parameters of the distribution. */
|
146
|
+
param_type param() const { return param_type(_k, _p); }
|
147
|
+
/** Sets parameters of the distribution. */
|
148
|
+
void param(const param_type& parm)
|
149
|
+
{
|
150
|
+
_k = parm.k();
|
151
|
+
_p = parm.p();
|
152
|
+
}
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Effects: Subsequent uses of the distribution do not depend
|
156
|
+
* on values produced by any engine prior to invoking reset.
|
157
|
+
*/
|
158
|
+
void reset() { }
|
159
|
+
|
160
|
+
#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
|
161
|
+
/** Writes the parameters of the distribution to a @c std::ostream. */
|
162
|
+
template<class CharT, class Traits>
|
163
|
+
friend std::basic_ostream<CharT,Traits>&
|
164
|
+
operator<<(std::basic_ostream<CharT,Traits>& os,
|
165
|
+
const negative_binomial_distribution& bd)
|
166
|
+
{
|
167
|
+
os << bd.param();
|
168
|
+
return os;
|
169
|
+
}
|
170
|
+
|
171
|
+
/** Reads the parameters of the distribution from a @c std::istream. */
|
172
|
+
template<class CharT, class Traits>
|
173
|
+
friend std::basic_istream<CharT,Traits>&
|
174
|
+
operator>>(std::basic_istream<CharT,Traits>& is,
|
175
|
+
negative_binomial_distribution& bd)
|
176
|
+
{
|
177
|
+
bd.read(is);
|
178
|
+
return is;
|
179
|
+
}
|
180
|
+
#endif
|
181
|
+
|
182
|
+
/** Returns true if the two distributions will produce the same
|
183
|
+
sequence of values, given equal generators. */
|
184
|
+
friend bool operator==(const negative_binomial_distribution& lhs,
|
185
|
+
const negative_binomial_distribution& rhs)
|
186
|
+
{
|
187
|
+
return lhs._k == rhs._k && lhs._p == rhs._p;
|
188
|
+
}
|
189
|
+
/** Returns true if the two distributions could produce different
|
190
|
+
sequences of values, given equal generators. */
|
191
|
+
friend bool operator!=(const negative_binomial_distribution& lhs,
|
192
|
+
const negative_binomial_distribution& rhs)
|
193
|
+
{
|
194
|
+
return !(lhs == rhs);
|
195
|
+
}
|
196
|
+
|
197
|
+
private:
|
198
|
+
|
199
|
+
/// @cond \show_private
|
200
|
+
|
201
|
+
template<class CharT, class Traits>
|
202
|
+
void read(std::basic_istream<CharT, Traits>& is) {
|
203
|
+
param_type parm;
|
204
|
+
if(is >> parm) {
|
205
|
+
param(parm);
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
// parameters
|
210
|
+
IntType _k;
|
211
|
+
RealType _p;
|
212
|
+
|
213
|
+
/// @endcond
|
214
|
+
};
|
215
|
+
|
216
|
+
}
|
217
|
+
|
218
|
+
}
|
219
|
+
|
220
|
+
#endif
|
@@ -0,0 +1,221 @@
|
|
1
|
+
/* boost random/non_central_chi_squared_distribution.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Thijs van den Berg 2014
|
4
|
+
*
|
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
|
+
|
14
|
+
#ifndef BOOST_RANDOM_NON_CENTRAL_CHI_SQUARED_DISTRIBUTION_HPP
|
15
|
+
#define BOOST_RANDOM_NON_CENTRAL_CHI_SQUARED_DISTRIBUTION_HPP
|
16
|
+
|
17
|
+
#include <boost/config/no_tr1/cmath.hpp>
|
18
|
+
#include <iosfwd>
|
19
|
+
#include <istream>
|
20
|
+
#include <boost/limits.hpp>
|
21
|
+
#include <boost/random/detail/config.hpp>
|
22
|
+
#include <boost/random/detail/operators.hpp>
|
23
|
+
#include <boost/random/uniform_real_distribution.hpp>
|
24
|
+
#include <boost/random/normal_distribution.hpp>
|
25
|
+
#include <boost/random/chi_squared_distribution.hpp>
|
26
|
+
#include <boost/random/poisson_distribution.hpp>
|
27
|
+
|
28
|
+
namespace boost {
|
29
|
+
namespace random {
|
30
|
+
|
31
|
+
/**
|
32
|
+
* The noncentral chi-squared distribution is a real valued distribution with
|
33
|
+
* two parameter, @c k and @c lambda. The distribution produces values > 0.
|
34
|
+
*
|
35
|
+
* This is the distribution of the sum of squares of k Normal distributed
|
36
|
+
* variates each with variance one and \f$\lambda\f$ the sum of squares of the
|
37
|
+
* normal means.
|
38
|
+
*
|
39
|
+
* The distribution function is
|
40
|
+
* \f$\displaystyle P(x) = \frac{1}{2} e^{-(x+\lambda)/2} \left( \frac{x}{\lambda} \right)^{k/4-1/2} I_{k/2-1}( \sqrt{\lambda x} )\f$.
|
41
|
+
* where \f$\displaystyle I_\nu(z)\f$ is a modified Bessel function of the
|
42
|
+
* first kind.
|
43
|
+
*
|
44
|
+
* The algorithm is taken from
|
45
|
+
*
|
46
|
+
* @blockquote
|
47
|
+
* "Monte Carlo Methods in Financial Engineering", Paul Glasserman,
|
48
|
+
* 2003, XIII, 596 p, Stochastic Modelling and Applied Probability, Vol. 53,
|
49
|
+
* ISBN 978-0-387-21617-1, p 124, Fig. 3.5.
|
50
|
+
* @endblockquote
|
51
|
+
*/
|
52
|
+
template <typename RealType = double>
|
53
|
+
class non_central_chi_squared_distribution {
|
54
|
+
public:
|
55
|
+
typedef RealType result_type;
|
56
|
+
typedef RealType input_type;
|
57
|
+
|
58
|
+
class param_type {
|
59
|
+
public:
|
60
|
+
typedef non_central_chi_squared_distribution distribution_type;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Constructs the parameters of a non_central_chi_squared_distribution.
|
64
|
+
* @c k and @c lambda are the parameter of the distribution.
|
65
|
+
*
|
66
|
+
* Requires: k > 0 && lambda > 0
|
67
|
+
*/
|
68
|
+
explicit
|
69
|
+
param_type(RealType k_arg = RealType(1), RealType lambda_arg = RealType(1))
|
70
|
+
: _k(k_arg), _lambda(lambda_arg)
|
71
|
+
{
|
72
|
+
BOOST_ASSERT(k_arg > RealType(0));
|
73
|
+
BOOST_ASSERT(lambda_arg > RealType(0));
|
74
|
+
}
|
75
|
+
|
76
|
+
/** Returns the @c k parameter of the distribution */
|
77
|
+
RealType k() const { return _k; }
|
78
|
+
|
79
|
+
/** Returns the @c lambda parameter of the distribution */
|
80
|
+
RealType lambda() const { return _lambda; }
|
81
|
+
|
82
|
+
/** Writes the parameters of the distribution to a @c std::ostream. */
|
83
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
|
84
|
+
{
|
85
|
+
os << parm._k << ' ' << parm._lambda;
|
86
|
+
return os;
|
87
|
+
}
|
88
|
+
|
89
|
+
/** Reads the parameters of the distribution from a @c std::istream. */
|
90
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
|
91
|
+
{
|
92
|
+
is >> parm._k >> std::ws >> parm._lambda;
|
93
|
+
return is;
|
94
|
+
}
|
95
|
+
|
96
|
+
/** Returns true if the parameters have the same values. */
|
97
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
|
98
|
+
{ return lhs._k == rhs._k && lhs._lambda == rhs._lambda; }
|
99
|
+
|
100
|
+
/** Returns true if the parameters have different values. */
|
101
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
|
102
|
+
|
103
|
+
private:
|
104
|
+
RealType _k;
|
105
|
+
RealType _lambda;
|
106
|
+
};
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Construct a @c non_central_chi_squared_distribution object. @c k and
|
110
|
+
* @c lambda are the parameter of the distribution.
|
111
|
+
*
|
112
|
+
* Requires: k > 0 && lambda > 0
|
113
|
+
*/
|
114
|
+
explicit
|
115
|
+
non_central_chi_squared_distribution(RealType k_arg = RealType(1), RealType lambda_arg = RealType(1))
|
116
|
+
: _param(k_arg, lambda_arg)
|
117
|
+
{
|
118
|
+
BOOST_ASSERT(k_arg > RealType(0));
|
119
|
+
BOOST_ASSERT(lambda_arg > RealType(0));
|
120
|
+
}
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Construct a @c non_central_chi_squared_distribution object from the parameter.
|
124
|
+
*/
|
125
|
+
explicit
|
126
|
+
non_central_chi_squared_distribution(const param_type& parm)
|
127
|
+
: _param( parm )
|
128
|
+
{ }
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Returns a random variate distributed according to the
|
132
|
+
* non central chi squared distribution specified by @c param.
|
133
|
+
*/
|
134
|
+
template<typename URNG>
|
135
|
+
RealType operator()(URNG& eng, const param_type& parm) const
|
136
|
+
{ return non_central_chi_squared_distribution(parm)(eng); }
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Returns a random variate distributed according to the
|
140
|
+
* non central chi squared distribution.
|
141
|
+
*/
|
142
|
+
template<typename URNG>
|
143
|
+
RealType operator()(URNG& eng)
|
144
|
+
{
|
145
|
+
using std::sqrt;
|
146
|
+
if (_param.k() > 1) {
|
147
|
+
boost::random::normal_distribution<RealType> n_dist;
|
148
|
+
boost::random::chi_squared_distribution<RealType> c_dist(_param.k() - RealType(1));
|
149
|
+
RealType _z = n_dist(eng);
|
150
|
+
RealType _x = c_dist(eng);
|
151
|
+
RealType term1 = _z + sqrt(_param.lambda());
|
152
|
+
return term1*term1 + _x;
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
boost::random::poisson_distribution<> p_dist(_param.lambda()/RealType(2));
|
156
|
+
boost::random::poisson_distribution<>::result_type _p = p_dist(eng);
|
157
|
+
boost::random::chi_squared_distribution<RealType> c_dist(_param.k() + RealType(2)*_p);
|
158
|
+
return c_dist(eng);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
/** Returns the @c k parameter of the distribution. */
|
163
|
+
RealType k() const { return _param.k(); }
|
164
|
+
|
165
|
+
/** Returns the @c lambda parameter of the distribution. */
|
166
|
+
RealType lambda() const { return _param.lambda(); }
|
167
|
+
|
168
|
+
/** Returns the parameters of the distribution. */
|
169
|
+
param_type param() const { return _param; }
|
170
|
+
|
171
|
+
/** Sets parameters of the distribution. */
|
172
|
+
void param(const param_type& parm) { _param = parm; }
|
173
|
+
|
174
|
+
/** Resets the distribution, so that subsequent uses does not depend on values already produced by it.*/
|
175
|
+
void reset() {}
|
176
|
+
|
177
|
+
/** Returns the smallest value that the distribution can produce. */
|
178
|
+
RealType min BOOST_PREVENT_MACRO_SUBSTITUTION() const
|
179
|
+
{ return RealType(0); }
|
180
|
+
|
181
|
+
/** Returns the largest value that the distribution can produce. */
|
182
|
+
RealType max BOOST_PREVENT_MACRO_SUBSTITUTION() const
|
183
|
+
{ return (std::numeric_limits<RealType>::infinity)(); }
|
184
|
+
|
185
|
+
/** Writes the parameters of the distribution to a @c std::ostream. */
|
186
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, non_central_chi_squared_distribution, dist)
|
187
|
+
{
|
188
|
+
os << dist.param();
|
189
|
+
return os;
|
190
|
+
}
|
191
|
+
|
192
|
+
/** reads the parameters of the distribution from a @c std::istream. */
|
193
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, non_central_chi_squared_distribution, dist)
|
194
|
+
{
|
195
|
+
param_type parm;
|
196
|
+
if(is >> parm) {
|
197
|
+
dist.param(parm);
|
198
|
+
}
|
199
|
+
return is;
|
200
|
+
}
|
201
|
+
|
202
|
+
/** Returns true if two distributions have the same parameters and produce
|
203
|
+
the same sequence of random numbers given equal generators.*/
|
204
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(non_central_chi_squared_distribution, lhs, rhs)
|
205
|
+
{ return lhs.param() == rhs.param(); }
|
206
|
+
|
207
|
+
/** Returns true if two distributions have different parameters and/or can produce
|
208
|
+
different sequences of random numbers given equal generators.*/
|
209
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(non_central_chi_squared_distribution)
|
210
|
+
|
211
|
+
private:
|
212
|
+
|
213
|
+
/// @cond show_private
|
214
|
+
param_type _param;
|
215
|
+
/// @endcond
|
216
|
+
};
|
217
|
+
|
218
|
+
} // namespace random
|
219
|
+
} // namespace boost
|
220
|
+
|
221
|
+
#endif
|
@@ -0,0 +1,374 @@
|
|
1
|
+
/* boost random/normal_distribution.hpp header file
|
2
|
+
*
|
3
|
+
* Copyright Jens Maurer 2000-2001
|
4
|
+
* Copyright Steven Watanabe 2010-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_NORMAL_DISTRIBUTION_HPP
|
18
|
+
#define BOOST_RANDOM_NORMAL_DISTRIBUTION_HPP
|
19
|
+
|
20
|
+
#include <boost/config/no_tr1/cmath.hpp>
|
21
|
+
#include <istream>
|
22
|
+
#include <iosfwd>
|
23
|
+
#include <boost/assert.hpp>
|
24
|
+
#include <boost/limits.hpp>
|
25
|
+
#include <boost/static_assert.hpp>
|
26
|
+
#include <boost/random/detail/config.hpp>
|
27
|
+
#include <boost/random/detail/operators.hpp>
|
28
|
+
#include <boost/random/detail/int_float_pair.hpp>
|
29
|
+
#include <boost/random/uniform_01.hpp>
|
30
|
+
#include <boost/random/exponential_distribution.hpp>
|
31
|
+
|
32
|
+
namespace boost {
|
33
|
+
namespace random {
|
34
|
+
|
35
|
+
namespace detail {
|
36
|
+
|
37
|
+
// tables for the ziggurat algorithm
|
38
|
+
template<class RealType>
|
39
|
+
struct normal_table {
|
40
|
+
static const RealType table_x[129];
|
41
|
+
static const RealType table_y[129];
|
42
|
+
};
|
43
|
+
|
44
|
+
template<class RealType>
|
45
|
+
const RealType normal_table<RealType>::table_x[129] = {
|
46
|
+
3.7130862467403632609, 3.4426198558966521214, 3.2230849845786185446, 3.0832288582142137009,
|
47
|
+
2.9786962526450169606, 2.8943440070186706210, 2.8231253505459664379, 2.7611693723841538514,
|
48
|
+
2.7061135731187223371, 2.6564064112581924999, 2.6109722484286132035, 2.5690336259216391328,
|
49
|
+
2.5300096723854666170, 2.4934545220919507609, 2.4590181774083500943, 2.4264206455302115930,
|
50
|
+
2.3954342780074673425, 2.3658713701139875435, 2.3375752413355307354, 2.3104136836950021558,
|
51
|
+
2.2842740596736568056, 2.2590595738653295251, 2.2346863955870569803, 2.2110814088747278106,
|
52
|
+
2.1881804320720206093, 2.1659267937448407377, 2.1442701823562613518, 2.1231657086697899595,
|
53
|
+
2.1025731351849988838, 2.0824562379877246441, 2.0627822745039633575, 2.0435215366506694976,
|
54
|
+
2.0246469733729338782, 2.0061338699589668403, 1.9879595741230607243, 1.9701032608497132242,
|
55
|
+
1.9525457295488889058, 1.9352692282919002011, 1.9182573008597320303, 1.9014946531003176140,
|
56
|
+
1.8849670357028692380, 1.8686611409895420085, 1.8525645117230870617, 1.8366654602533840447,
|
57
|
+
1.8209529965910050740, 1.8054167642140487420, 1.7900469825946189862, 1.7748343955807692457,
|
58
|
+
1.7597702248942318749, 1.7448461281083765085, 1.7300541605582435350, 1.7153867407081165482,
|
59
|
+
1.7008366185643009437, 1.6863968467734863258, 1.6720607540918522072, 1.6578219209482075462,
|
60
|
+
1.6436741568569826489, 1.6296114794646783962, 1.6156280950371329644, 1.6017183802152770587,
|
61
|
+
1.5878768648844007019, 1.5740982160167497219, 1.5603772223598406870, 1.5467087798535034608,
|
62
|
+
1.5330878776675560787, 1.5195095847593707806, 1.5059690368565502602, 1.4924614237746154081,
|
63
|
+
1.4789819769830978546, 1.4655259573357946276, 1.4520886428822164926, 1.4386653166774613138,
|
64
|
+
1.4252512545068615734, 1.4118417124397602509, 1.3984319141236063517, 1.3850170377251486449,
|
65
|
+
1.3715922024197322698, 1.3581524543224228739, 1.3446927517457130432, 1.3312079496576765017,
|
66
|
+
1.3176927832013429910, 1.3041418501204215390, 1.2905495919178731508, 1.2769102735516997175,
|
67
|
+
1.2632179614460282310, 1.2494664995643337480, 1.2356494832544811749, 1.2217602305309625678,
|
68
|
+
1.2077917504067576028, 1.1937367078237721994, 1.1795873846544607035, 1.1653356361550469083,
|
69
|
+
1.1509728421389760651, 1.1364898520030755352, 1.1218769225722540661, 1.1071236475235353980,
|
70
|
+
1.0922188768965537614, 1.0771506248819376573, 1.0619059636836193998, 1.0464709007525802629,
|
71
|
+
1.0308302360564555907, 1.0149673952392994716, 0.99886423348064351303, 0.98250080350276038481,
|
72
|
+
0.96585507938813059489, 0.94890262549791195381, 0.93161619660135381056, 0.91396525100880177644,
|
73
|
+
0.89591535256623852894, 0.87742742909771569142, 0.85845684317805086354, 0.83895221428120745572,
|
74
|
+
0.81885390668331772331, 0.79809206062627480454, 0.77658398787614838598, 0.75423066443451007146,
|
75
|
+
0.73091191062188128150, 0.70647961131360803456, 0.68074791864590421664, 0.65347863871504238702,
|
76
|
+
0.62435859730908822111, 0.59296294244197797913, 0.55869217837551797140, 0.52065603872514491759,
|
77
|
+
0.47743783725378787681, 0.42654798630330512490, 0.36287143102841830424, 0.27232086470466385065,
|
78
|
+
0
|
79
|
+
};
|
80
|
+
|
81
|
+
template<class RealType>
|
82
|
+
const RealType normal_table<RealType>::table_y[129] = {
|
83
|
+
0, 0.0026696290839025035092, 0.0055489952208164705392, 0.0086244844129304709682,
|
84
|
+
0.011839478657982313715, 0.015167298010672042468, 0.018592102737165812650, 0.022103304616111592615,
|
85
|
+
0.025693291936149616572, 0.029356317440253829618, 0.033087886146505155566, 0.036884388786968774128,
|
86
|
+
0.040742868074790604632, 0.044660862200872429800, 0.048636295860284051878, 0.052667401903503169793,
|
87
|
+
0.056752663481538584188, 0.060890770348566375972, 0.065080585213631873753, 0.069321117394180252601,
|
88
|
+
0.073611501884754893389, 0.077950982514654714188, 0.082338898242957408243, 0.086774671895542968998,
|
89
|
+
0.091257800827634710201, 0.09578784912257815216, 0.10036444102954554013, 0.10498725541035453978,
|
90
|
+
0.10965602101581776100, 0.11437051244988827452, 0.11913054670871858767, 0.12393598020398174246,
|
91
|
+
0.12878670619710396109, 0.13368265258464764118, 0.13862377998585103702, 0.14361008009193299469,
|
92
|
+
0.14864157424369696566, 0.15371831220958657066, 0.15884037114093507813, 0.16400785468492774791,
|
93
|
+
0.16922089223892475176, 0.17447963833240232295, 0.17978427212496211424, 0.18513499701071343216,
|
94
|
+
0.19053204032091372112, 0.19597565311811041399, 0.20146611007620324118, 0.20700370944187380064,
|
95
|
+
0.21258877307373610060, 0.21822164655637059599, 0.22390269938713388747, 0.22963232523430270355,
|
96
|
+
0.23541094226572765600, 0.24123899354775131610, 0.24711694751469673582, 0.25304529850976585934,
|
97
|
+
0.25902456739871074263, 0.26505530225816194029, 0.27113807914102527343, 0.27727350292189771153,
|
98
|
+
0.28346220822601251779, 0.28970486044581049771, 0.29600215684985583659, 0.30235482778947976274,
|
99
|
+
0.30876363800925192282, 0.31522938806815752222, 0.32175291587920862031, 0.32833509837615239609,
|
100
|
+
0.33497685331697116147, 0.34167914123501368412, 0.34844296754987246935, 0.35526938485154714435,
|
101
|
+
0.36215949537303321162, 0.36911445366827513952, 0.37613546951445442947, 0.38322381105988364587,
|
102
|
+
0.39038080824138948916, 0.39760785649804255208, 0.40490642081148835099, 0.41227804010702462062,
|
103
|
+
0.41972433205403823467, 0.42724699830956239880, 0.43484783025466189638, 0.44252871528024661483,
|
104
|
+
0.45029164368692696086, 0.45813871627287196483, 0.46607215269457097924, 0.47409430069824960453,
|
105
|
+
0.48220764633483869062, 0.49041482528932163741, 0.49871863547658432422, 0.50712205108130458951,
|
106
|
+
0.51562823824987205196, 0.52424057267899279809, 0.53296265938998758838, 0.54179835503172412311,
|
107
|
+
0.55075179312105527738, 0.55982741271069481791, 0.56902999107472161225, 0.57836468112670231279,
|
108
|
+
0.58783705444182052571, 0.59745315095181228217, 0.60721953663260488551, 0.61714337082656248870,
|
109
|
+
0.62723248525781456578, 0.63749547734314487428, 0.64794182111855080873, 0.65858200005865368016,
|
110
|
+
0.66942766735770616891, 0.68049184100641433355, 0.69178914344603585279, 0.70333609902581741633,
|
111
|
+
0.71515150742047704368, 0.72725691835450587793, 0.73967724368333814856, 0.75244155918570380145,
|
112
|
+
0.76558417390923599480, 0.77914608594170316563, 0.79317701178385921053, 0.80773829469612111340,
|
113
|
+
0.82290721139526200050, 0.83878360531064722379, 0.85550060788506428418, 0.87324304892685358879,
|
114
|
+
0.89228165080230272301, 0.91304364799203805999, 0.93628268170837107547, 0.96359969315576759960,
|
115
|
+
1
|
116
|
+
};
|
117
|
+
|
118
|
+
|
119
|
+
template<class RealType = double>
|
120
|
+
struct unit_normal_distribution
|
121
|
+
{
|
122
|
+
template<class Engine>
|
123
|
+
RealType operator()(Engine& eng) {
|
124
|
+
const double * const table_x = normal_table<double>::table_x;
|
125
|
+
const double * const table_y = normal_table<double>::table_y;
|
126
|
+
for(;;) {
|
127
|
+
std::pair<RealType, int> vals = generate_int_float_pair<RealType, 8>(eng);
|
128
|
+
int i = vals.second;
|
129
|
+
int sign = (i & 1) * 2 - 1;
|
130
|
+
i = i >> 1;
|
131
|
+
RealType x = vals.first * RealType(table_x[i]);
|
132
|
+
if(x < table_x[i + 1]) return x * sign;
|
133
|
+
if(i == 0) return generate_tail(eng) * sign;
|
134
|
+
|
135
|
+
RealType y01 = uniform_01<RealType>()(eng);
|
136
|
+
RealType y = RealType(table_y[i]) + y01 * RealType(table_y[i + 1] - table_y[i]);
|
137
|
+
|
138
|
+
// These store the value y - bound, or something proportional to that difference:
|
139
|
+
RealType y_above_ubound, y_above_lbound;
|
140
|
+
|
141
|
+
// There are three cases to consider:
|
142
|
+
// - convex regions (where x[i] > x[j] >= 1)
|
143
|
+
// - concave regions (where 1 <= x[i] < x[j])
|
144
|
+
// - region containing the inflection point (where x[i] > 1 > x[j])
|
145
|
+
// For convex (concave), exp^(-x^2/2) is bounded below (above) by the tangent at
|
146
|
+
// (x[i],y[i]) and is bounded above (below) by the diagonal line from (x[i+1],y[i+1]) to
|
147
|
+
// (x[i],y[i]).
|
148
|
+
//
|
149
|
+
// *If* the inflection point region satisfies slope(x[i+1]) < slope(diagonal), then we
|
150
|
+
// can treat the inflection region as a convex region: this condition is necessary and
|
151
|
+
// sufficient to ensure that the curve lies entirely below the diagonal (that, in turn,
|
152
|
+
// also implies that it will be above the tangent at x[i]).
|
153
|
+
//
|
154
|
+
// For the current table size (128), this is satisfied: slope(x[i+1]) = -0.60653 <
|
155
|
+
// slope(diag) = -0.60649, and so we have only two cases below instead of three.
|
156
|
+
|
157
|
+
if (table_x[i] >= 1) { // convex (incl. inflection)
|
158
|
+
y_above_ubound = RealType(table_x[i] - table_x[i+1]) * y01 - (RealType(table_x[i]) - x);
|
159
|
+
y_above_lbound = y - (RealType(table_y[i]) + (RealType(table_x[i]) - x) * RealType(table_y[i]) * RealType(table_x[i]));
|
160
|
+
}
|
161
|
+
else { // concave
|
162
|
+
y_above_lbound = RealType(table_x[i] - table_x[i+1]) * y01 - (RealType(table_x[i]) - x);
|
163
|
+
y_above_ubound = y - (RealType(table_y[i]) + (RealType(table_x[i]) - x) * RealType(table_y[i]) * RealType(table_x[i]));
|
164
|
+
}
|
165
|
+
|
166
|
+
if (y_above_ubound < 0 // if above the upper bound reject immediately
|
167
|
+
&&
|
168
|
+
(
|
169
|
+
y_above_lbound < 0 // If below the lower bound accept immediately
|
170
|
+
||
|
171
|
+
y < f(x) // Otherwise it's between the bounds and we need a full check
|
172
|
+
)
|
173
|
+
) {
|
174
|
+
return x * sign;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
static RealType f(RealType x) {
|
179
|
+
using std::exp;
|
180
|
+
return exp(-(x*x/2));
|
181
|
+
}
|
182
|
+
// Generate from the tail using rejection sampling from the exponential(x_1) distribution,
|
183
|
+
// shifted by x_1. This looks a little different from the usual rejection sampling because it
|
184
|
+
// transforms the condition by taking the log of both sides, thus avoiding the costly exp() call
|
185
|
+
// on the RHS, then takes advantage of the fact that -log(unif01) is simply generating an
|
186
|
+
// exponential (by inverse cdf sampling) by replacing the log(unif01) on the LHS with a
|
187
|
+
// exponential(1) draw, y.
|
188
|
+
template<class Engine>
|
189
|
+
RealType generate_tail(Engine& eng) {
|
190
|
+
const RealType tail_start = RealType(normal_table<double>::table_x[1]);
|
191
|
+
boost::random::exponential_distribution<RealType> exp_x(tail_start);
|
192
|
+
boost::random::exponential_distribution<RealType> exp_y;
|
193
|
+
for(;;) {
|
194
|
+
RealType x = exp_x(eng);
|
195
|
+
RealType y = exp_y(eng);
|
196
|
+
// If we were doing non-transformed rejection sampling, this condition would be:
|
197
|
+
// if (unif01 < exp(-.5*x*x)) return x + tail_start;
|
198
|
+
if(2*y > x*x) return x + tail_start;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
};
|
202
|
+
|
203
|
+
} // namespace detail
|
204
|
+
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Instantiations of class template normal_distribution model a
|
208
|
+
* \random_distribution. Such a distribution produces random numbers
|
209
|
+
* @c x distributed with probability density function
|
210
|
+
* \f$\displaystyle p(x) =
|
211
|
+
* \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}}
|
212
|
+
* \f$,
|
213
|
+
* where mean and sigma are the parameters of the distribution.
|
214
|
+
*
|
215
|
+
* The implementation uses the "ziggurat" algorithm, as described in
|
216
|
+
*
|
217
|
+
* @blockquote
|
218
|
+
* "The Ziggurat Method for Generating Random Variables",
|
219
|
+
* George Marsaglia and Wai Wan Tsang, Journal of Statistical Software,
|
220
|
+
* Volume 5, Number 8 (2000), 1-7.
|
221
|
+
* @endblockquote
|
222
|
+
*/
|
223
|
+
template<class RealType = double>
|
224
|
+
class normal_distribution
|
225
|
+
{
|
226
|
+
public:
|
227
|
+
typedef RealType input_type;
|
228
|
+
typedef RealType result_type;
|
229
|
+
|
230
|
+
class param_type {
|
231
|
+
public:
|
232
|
+
typedef normal_distribution distribution_type;
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Constructs a @c param_type with a given mean and
|
236
|
+
* standard deviation.
|
237
|
+
*
|
238
|
+
* Requires: sigma >= 0
|
239
|
+
*/
|
240
|
+
explicit param_type(RealType mean_arg = RealType(0.0),
|
241
|
+
RealType sigma_arg = RealType(1.0))
|
242
|
+
: _mean(mean_arg),
|
243
|
+
_sigma(sigma_arg)
|
244
|
+
{}
|
245
|
+
|
246
|
+
/** Returns the mean of the distribution. */
|
247
|
+
RealType mean() const { return _mean; }
|
248
|
+
|
249
|
+
/** Returns the standand deviation of the distribution. */
|
250
|
+
RealType sigma() const { return _sigma; }
|
251
|
+
|
252
|
+
/** Writes a @c param_type to a @c std::ostream. */
|
253
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
|
254
|
+
{ os << parm._mean << " " << parm._sigma ; return os; }
|
255
|
+
|
256
|
+
/** Reads a @c param_type from a @c std::istream. */
|
257
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
|
258
|
+
{ is >> parm._mean >> std::ws >> parm._sigma; return is; }
|
259
|
+
|
260
|
+
/** Returns true if the two sets of parameters are the same. */
|
261
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
|
262
|
+
{ return lhs._mean == rhs._mean && lhs._sigma == rhs._sigma; }
|
263
|
+
|
264
|
+
/** Returns true if the two sets of parameters are the different. */
|
265
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)
|
266
|
+
|
267
|
+
private:
|
268
|
+
RealType _mean;
|
269
|
+
RealType _sigma;
|
270
|
+
};
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Constructs a @c normal_distribution object. @c mean and @c sigma are
|
274
|
+
* the parameters for the distribution.
|
275
|
+
*
|
276
|
+
* Requires: sigma >= 0
|
277
|
+
*/
|
278
|
+
explicit normal_distribution(const RealType& mean_arg = RealType(0.0),
|
279
|
+
const RealType& sigma_arg = RealType(1.0))
|
280
|
+
: _mean(mean_arg), _sigma(sigma_arg)
|
281
|
+
{
|
282
|
+
BOOST_ASSERT(_sigma >= RealType(0));
|
283
|
+
}
|
284
|
+
|
285
|
+
/**
|
286
|
+
* Constructs a @c normal_distribution object from its parameters.
|
287
|
+
*/
|
288
|
+
explicit normal_distribution(const param_type& parm)
|
289
|
+
: _mean(parm.mean()), _sigma(parm.sigma())
|
290
|
+
{}
|
291
|
+
|
292
|
+
/** Returns the mean of the distribution. */
|
293
|
+
RealType mean() const { return _mean; }
|
294
|
+
/** Returns the standard deviation of the distribution. */
|
295
|
+
RealType sigma() const { return _sigma; }
|
296
|
+
|
297
|
+
/** Returns the smallest value that the distribution can produce. */
|
298
|
+
RealType min BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
299
|
+
{ return -std::numeric_limits<RealType>::infinity(); }
|
300
|
+
/** Returns the largest value that the distribution can produce. */
|
301
|
+
RealType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
302
|
+
{ return std::numeric_limits<RealType>::infinity(); }
|
303
|
+
|
304
|
+
/** Returns the parameters of the distribution. */
|
305
|
+
param_type param() const { return param_type(_mean, _sigma); }
|
306
|
+
/** Sets the parameters of the distribution. */
|
307
|
+
void param(const param_type& parm)
|
308
|
+
{
|
309
|
+
_mean = parm.mean();
|
310
|
+
_sigma = parm.sigma();
|
311
|
+
}
|
312
|
+
|
313
|
+
/**
|
314
|
+
* Effects: Subsequent uses of the distribution do not depend
|
315
|
+
* on values produced by any engine prior to invoking reset.
|
316
|
+
*/
|
317
|
+
void reset() { }
|
318
|
+
|
319
|
+
/** Returns a normal variate. */
|
320
|
+
template<class Engine>
|
321
|
+
result_type operator()(Engine& eng)
|
322
|
+
{
|
323
|
+
detail::unit_normal_distribution<RealType> impl;
|
324
|
+
return impl(eng) * _sigma + _mean;
|
325
|
+
}
|
326
|
+
|
327
|
+
/** Returns a normal variate with parameters specified by @c param. */
|
328
|
+
template<class URNG>
|
329
|
+
result_type operator()(URNG& urng, const param_type& parm)
|
330
|
+
{
|
331
|
+
return normal_distribution(parm)(urng);
|
332
|
+
}
|
333
|
+
|
334
|
+
/** Writes a @c normal_distribution to a @c std::ostream. */
|
335
|
+
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, normal_distribution, nd)
|
336
|
+
{
|
337
|
+
os << nd._mean << " " << nd._sigma;
|
338
|
+
return os;
|
339
|
+
}
|
340
|
+
|
341
|
+
/** Reads a @c normal_distribution from a @c std::istream. */
|
342
|
+
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, normal_distribution, nd)
|
343
|
+
{
|
344
|
+
is >> std::ws >> nd._mean >> std::ws >> nd._sigma;
|
345
|
+
return is;
|
346
|
+
}
|
347
|
+
|
348
|
+
/**
|
349
|
+
* Returns true if the two instances of @c normal_distribution will
|
350
|
+
* return identical sequences of values given equal generators.
|
351
|
+
*/
|
352
|
+
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(normal_distribution, lhs, rhs)
|
353
|
+
{
|
354
|
+
return lhs._mean == rhs._mean && lhs._sigma == rhs._sigma;
|
355
|
+
}
|
356
|
+
|
357
|
+
/**
|
358
|
+
* Returns true if the two instances of @c normal_distribution will
|
359
|
+
* return different sequences of values given equal generators.
|
360
|
+
*/
|
361
|
+
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(normal_distribution)
|
362
|
+
|
363
|
+
private:
|
364
|
+
RealType _mean, _sigma;
|
365
|
+
|
366
|
+
};
|
367
|
+
|
368
|
+
} // namespace random
|
369
|
+
|
370
|
+
using random::normal_distribution;
|
371
|
+
|
372
|
+
} // namespace boost
|
373
|
+
|
374
|
+
#endif // BOOST_RANDOM_NORMAL_DISTRIBUTION_HPP
|