From patchwork Fri Sep 21 12:36:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ed Smith-Rowland <3dw4rd@verizon.net> X-Patchwork-Id: 185725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E5F2E2C0086 for ; Fri, 21 Sep 2012 22:37:51 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348835873; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-id:Date:From:User-Agent:MIME-version:To:Cc:Subject: References:In-reply-to:Content-type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=3bY7qECGd+UZ6Bz0cjbzKuvUMLM=; b=cXBwB6ZVg3njTDH Hvk4SRJldlYNGMkmHHUQuHbGFGvu+bHQidkq9y0RpAV1Ee/K6w8zxqRykUxjRjpf JOY3WiF1wjTdKz5FWej+bhCqdW/oF5ITD9tPSaRm7vWgw02xq2uGlrG3FW+rK2Qi 3V5PXpmtB6HiWp37daaI9ju9AYn0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Message-id:Date:From:User-Agent:MIME-version:To:Cc:Subject:References:In-reply-to:Content-type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=lSjlTtlKSgPBGeLcd540gBXa/WTbxijcsTbOEzaJ8qiPf00bbS5MVV8a+aSxNx DJNrKSNjrRW9fvofyAup1TxNJGqZ8jHJxe1WaSFn0cgsod2wEXud+kiZQ7AujMw2 Eh8iaP7zRF1sYepVnQJCWiMEv1RRPjiyQt7gC30Z33Ch8=; Received: (qmail 26200 invoked by alias); 21 Sep 2012 12:37:45 -0000 Received: (qmail 25787 invoked by uid 22791); 21 Sep 2012 12:37:41 -0000 X-SWARE-Spam-Status: Yes, hits=6.3 required=5.0 tests=AWL, BAYES_20, BOTNET, KHOP_THREADED, NORMAL_HTTP_TO_IP, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_CX, URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from vms173007pub.verizon.net (HELO vms173007pub.verizon.net) (206.46.173.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Sep 2012 12:37:26 +0000 Received: from [192.168.1.8] ([unknown] [96.234.174.152]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MAP00GG59PISI00@vms173007.mailsrvcs.net>; Fri, 21 Sep 2012 07:36:56 -0500 (CDT) Message-id: <505C5F69.2080007@verizon.net> Date: Fri, 21 Sep 2012 08:36:57 -0400 From: Ed Smith-Rowland <3dw4rd@verizon.net> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-version: 1.0 To: Paolo Carlini Cc: Ulrich Drepper , "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: Implement Pareto distribution as an extension. References: <50573F1A.1050000@verizon.net> <5057CD07.5050004@verizon.net> <505884F2.6090907@oracle.com> <505A7AFB.3070300@verizon.net> <505AED54.40200@oracle.com> <505C3480.5060303@oracle.com> In-reply-to: <505C3480.5060303@oracle.com> Content-type: multipart/mixed; boundary=------------020309050805000308010008 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 09/21/2012 05:33 AM, Paolo Carlini wrote: > On 09/21/2012 11:02 AM, Ulrich Drepper wrote: >> On Thu, Sep 20, 2012 at 6:17 AM, Paolo Carlini >> wrote: >>> Patch looks generally Ok to me. If Ulrich and the other interested >>> parties >>> don't have anything to add over the next 24 hrs or so, let's go >>> ahead and >>> thanks again! >> Unfortunately I won't have any time until Wednesday. I'm sure there's >> nothing in the patch which if necessary cannot be fixed. > Good, Ok then we can commit it. >> For testing we might want to utilize R for testing, if available. Or >> specific test generation. There are some things that can be done. >> But I have some other patches to contribute first. Next week... > Ok... > > Paolo. > Committed. Ed 2012-09-21 Edward Smith-Rowland <3dw4rd@verizon.net> * include/ext/random: Add __gnu_cxx::pareto_distribution<> class. * include/ext/random.tcc: Add out-of-line functions for __gnu_cxx::pareto_distribution<>. * testsuite/ext/random/pareto_distribution/operators/equal.cc: New file. * testsuite/ext/random/pareto_distribution/operators/serialize.cc: New file. * testsuite/ext/random/pareto_distribution/operators/inequal.cc: New file. * testsuite/ext/random/pareto_distribution/cons/parms.cc: New file. * testsuite/ext/random/pareto_distribution/cons/default.cc: New file. * testsuite/ext/random/pareto_distribution/requirements/typedefs.cc: New file. * testsuite/ext/random/pareto_distribution/requirements/ explicit_instantiation/1.cc: New file. Index: include/ext/random =================================================================== --- include/ext/random (revision 191434) +++ include/ext/random (working copy) @@ -1360,6 +1360,242 @@ const nakagami_distribution<_RealType>& __d2) { return !(__d1 == __d2); } + + /** + * @brief A Pareto continuous distribution for random numbers. + * + * The formula for the Pareto cumulative probability function is + * @f[ + * P(x|\alpha,\mu) = 1 - \left(\frac{\mu}{x}\right)^\alpha + * @f] + * The formula for the Pareto probability density function is + * @f[ + * p(x|\alpha,\mu) = \frac{\alpha + 1}{\mu} + * \left(\frac{\mu}{x}\right)^{\alpha + 1} + * @f] + * where @f$x >= \mu@f$ and @f$\mu > 0@f$, @f$\alpha > 0@f$. + * + * + * + * + * + * + *
Distribution Statistics
Mean@f$\alpha \mu / (\alpha - 1)@f$ + * for @f$\alpha > 1@f$
Variance@f$\alpha \mu^2 / [(\alpha - 1)^2(\alpha - 2)]@f$ + * for @f$\alpha > 2@f$
Range@f$[\mu, \infty)@f$
+ */ + template + class + pareto_distribution + { + static_assert(std::is_floating_point<_RealType>::value, + "template argument not a floating point type"); + + public: + /** The type of the range of the distribution. */ + typedef _RealType result_type; + /** Parameter type. */ + struct param_type + { + typedef pareto_distribution distribution_type; + + param_type(result_type __alpha = result_type(1), + result_type __mu = result_type(1)) + : _M_alpha(__alpha), _M_mu(__mu) + { + _GLIBCXX_DEBUG_ASSERT(_M_alpha > result_type(0)); + _GLIBCXX_DEBUG_ASSERT(_M_mu > result_type(0)); + } + + result_type + alpha() const + { return _M_alpha; } + + result_type + mu() const + { return _M_mu; } + + friend bool + operator==(const param_type& __p1, const param_type& __p2) + { return __p1._M_alpha == __p2._M_alpha && __p1._M_mu == __p2._M_mu; } + + private: + void _M_initialize(); + + result_type _M_alpha; + result_type _M_mu; + }; + + /** + * @brief Constructors. + */ + explicit + pareto_distribution(result_type __alpha = result_type(1), + result_type __mu = result_type(1)) + : _M_param(__alpha, __mu), + _M_ud() + { } + + explicit + pareto_distribution(const param_type& __p) + : _M_param(__p), + _M_ud() + { } + + /** + * @brief Resets the distribution state. + */ + void + reset() + { + _M_ud.reset(); + } + + /** + * @brief Return the parameters of the distribution. + */ + result_type + alpha() const + { return _M_param.alpha(); } + + result_type + mu() const + { return _M_param.mu(); } + + /** + * @brief Returns the parameter set of the distribution. + */ + param_type + param() const + { return _M_param; } + + /** + * @brief Sets the parameter set of the distribution. + * @param __param The new parameter set of the distribution. + */ + void + param(const param_type& __param) + { _M_param = __param; } + + /** + * @brief Returns the greatest lower bound value of the distribution. + */ + result_type + min() const + { return this->mu(); } + + /** + * @brief Returns the least upper bound value of the distribution. + */ + result_type + max() const + { return std::numeric_limits::max(); } + + /** + * @brief Generating functions. + */ + template + result_type + operator()(_UniformRandomNumberGenerator& __urng) + { + return this->mu() * std::pow(this->_M_ud(__urng), + -result_type(1) / this->alpha()); + } + + template + result_type + operator()(_UniformRandomNumberGenerator& __urng, + const param_type& __p) + { + return __p.mu() * std::pow(this->_M_ud(__urng), + -result_type(1) / __p.alpha()); + } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng) + { this->__generate(__f, __t, __urng, this->param()); } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + template + void + __generate(result_type* __f, result_type* __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + /** + * @brief Return true if two Pareto distributions have + * the same parameters and the sequences that would + * be generated are equal. + */ + friend bool + operator==(const pareto_distribution& __d1, + const pareto_distribution& __d2) + { return (__d1.param() == __d2.param() + && __d1._M_ud == __d2._M_ud); } + + /** + * @brief Inserts a %pareto_distribution random number distribution + * @p __x into the output stream @p __os. + * + * @param __os An output stream. + * @param __x A %pareto_distribution random number distribution. + * + * @returns The output stream with the state of @p __x inserted or in + * an error state. + */ + template + friend std::basic_ostream<_CharT, _Traits>& + operator<<(std::basic_ostream<_CharT, _Traits>&, + const pareto_distribution<_RealType1>&); + + /** + * @brief Extracts a %pareto_distribution random number distribution + * @p __x from the input stream @p __is. + * + * @param __is An input stream. + * @param __x A %pareto_distribution random number + * generator engine. + * + * @returns The input stream with @p __x extracted or in an error state. + */ + template + friend std::basic_istream<_CharT, _Traits>& + operator>>(std::basic_istream<_CharT, _Traits>&, + pareto_distribution<_RealType1>&); + + private: + template + void + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p); + + param_type _M_param; + + std::uniform_real_distribution _M_ud; + }; + + /** + * @brief Return true if two Pareto distributions are not equal. + */ + template + inline bool + operator!=(const pareto_distribution<_RealType>& __d1, + const pareto_distribution<_RealType>& __d2) + { return !(__d1 == __d2); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __gnu_cxx Index: include/ext/random.tcc =================================================================== --- include/ext/random.tcc (revision 191434) +++ include/ext/random.tcc (working copy) @@ -848,6 +848,70 @@ return __is; } + + template + template + void + pareto_distribution<_RealType>:: + __generate_impl(_OutputIterator __f, _OutputIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + + result_type __mu = __p.mu(); + result_type __malphinv = -result_type(1) / __p.alpha(); + while (__f != __t) + *__f++ = __mu * std::pow(this->_M_ud(__urng), __malphinv); + } + + template + std::basic_ostream<_CharT, _Traits>& + operator<<(std::basic_ostream<_CharT, _Traits>& __os, + const pareto_distribution<_RealType>& __x) + { + typedef std::basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const typename __ios_base::fmtflags __flags = __os.flags(); + const _CharT __fill = __os.fill(); + const std::streamsize __precision = __os.precision(); + const _CharT __space = __os.widen(' '); + __os.flags(__ios_base::scientific | __ios_base::left); + __os.fill(__space); + __os.precision(std::numeric_limits<_RealType>::max_digits10); + + __os << __x.alpha() << __space << __x.mu(); + __os << __space << __x._M_ud; + + __os.flags(__flags); + __os.fill(__fill); + __os.precision(__precision); + return __os; + } + + template + std::basic_istream<_CharT, _Traits>& + operator>>(std::basic_istream<_CharT, _Traits>& __is, + pareto_distribution<_RealType>& __x) + { + typedef std::basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::ios_base __ios_base; + + const typename __ios_base::fmtflags __flags = __is.flags(); + __is.flags(__ios_base::dec | __ios_base::skipws); + + _RealType __alpha, __mu; + __is >> __alpha >> __mu; + __is >> __x._M_ud; + __x.param(typename pareto_distribution<_RealType>:: + param_type(__alpha, __mu)); + + __is.flags(__flags); + return __is; + } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace Index: testsuite/ext/random/pareto_distribution/operators/inequal.cc =================================================================== --- testsuite/ext/random/pareto_distribution/operators/inequal.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/operators/inequal.cc (revision 0) @@ -0,0 +1,44 @@ +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.5.8.4.5 Class template pareto_distribution [rand.dist.ext.pareto] + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::pareto_distribution u(2.0, 3.0), v, w; + + VERIFY( u != v ); + VERIFY( !(v != w) ); +} + +int +main() +{ + test01(); + return 0; +} Index: testsuite/ext/random/pareto_distribution/operators/equal.cc =================================================================== --- testsuite/ext/random/pareto_distribution/operators/equal.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/operators/equal.cc (revision 0) @@ -0,0 +1,44 @@ +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.5.8.4.5 Class template pareto_distribution [rand.dist.ext.pareto] + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::pareto_distribution u(2.0, 3.0), v, w; + + VERIFY( v == w ); + VERIFY( !(u == v) ); +} + +int +main() +{ + test01(); + return 0; +} Index: testsuite/ext/random/pareto_distribution/operators/serialize.cc =================================================================== --- testsuite/ext/random/pareto_distribution/operators/serialize.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/operators/serialize.cc (revision 0) @@ -0,0 +1,51 @@ +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.4.8.3.* Class template pareto_distribution [rand.dist.ext.pareto] +// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] + +#include +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + std::stringstream str; + __gnu_cxx::pareto_distribution u(1.5, 3.0), v; + std::minstd_rand0 rng; + + u(rng); // advance + str << u; + + str >> v; + VERIFY( u == v ); +} + +int +main() +{ + test01(); + return 0; +} Index: testsuite/ext/random/pareto_distribution/cons/parms.cc =================================================================== --- testsuite/ext/random/pareto_distribution/cons/parms.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/cons/parms.cc (revision 0) @@ -0,0 +1,47 @@ +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.4.8.3.* Class template pareto_distribution [rand.dist.ext.pareto] +// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::pareto_distribution<> u(1.5, 3.0); + VERIFY( u.alpha() == 1.5 ); + VERIFY( u.mu() == 3.0 ); + VERIFY( u.min() == 3.0 ); + typedef __gnu_cxx::pareto_distribution<>::result_type result_type; + VERIFY( u.max() == std::numeric_limits::max() ); +} + +int +main() +{ + test01(); + return 0; +} Index: testsuite/ext/random/pareto_distribution/cons/default.cc =================================================================== --- testsuite/ext/random/pareto_distribution/cons/default.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/cons/default.cc (revision 0) @@ -0,0 +1,47 @@ +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.4.8.3.* Class template pareto_distribution [rand.dist.ext.pareto] +// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::pareto_distribution<> u; + VERIFY( u.alpha() == 1.0 ); + VERIFY( u.mu() == 1.0 ); + VERIFY( u.min() == 1.0 ); + typedef __gnu_cxx::pareto_distribution<>::result_type result_type; + VERIFY( u.max() == std::numeric_limits::max() ); +} + +int +main() +{ + test01(); + return 0; +} Index: testsuite/ext/random/pareto_distribution/requirements/explicit_instantiation/1.cc =================================================================== --- testsuite/ext/random/pareto_distribution/requirements/explicit_instantiation/1.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/requirements/explicit_instantiation/1.cc (revision 0) @@ -0,0 +1,26 @@ +// { dg-do compile } +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// Copyright (C) 2012 Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +template class __gnu_cxx::pareto_distribution; +template class __gnu_cxx::pareto_distribution; +template class __gnu_cxx::pareto_distribution; Index: testsuite/ext/random/pareto_distribution/requirements/typedefs.cc =================================================================== --- testsuite/ext/random/pareto_distribution/requirements/typedefs.cc (revision 0) +++ testsuite/ext/random/pareto_distribution/requirements/typedefs.cc (revision 0) @@ -0,0 +1,36 @@ +// { dg-do compile } +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// 2012-09-21 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// 26.4.8.3.* Class template pareto_distribution [rand.dist.ext.pareto] +// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist] + +#include + +void +test01() +{ + typedef __gnu_cxx::pareto_distribution test_type; + + typedef test_type::result_type result_type; + typedef test_type::param_type param_type; +}