1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Hyperexponential Distribution</title> 5<link rel="stylesheet" href="../../../math.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../index.html" title="Math Toolkit 2.12.0"> 8<link rel="up" href="../dists.html" title="Distributions"> 9<link rel="prev" href="geometric_dist.html" title="Geometric Distribution"> 10<link rel="next" href="hypergeometric_dist.html" title="Hypergeometric Distribution"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hypergeometric_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="math_toolkit.dist_ref.dists.hyperexponential_dist"></a><a class="link" href="hyperexponential_dist.html" title="Hyperexponential Distribution">Hyperexponential 28 Distribution</a> 29</h4></div></div></div> 30<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">hyperexponential</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></pre> 31<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span> 32 33<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span> 34 <span class="keyword">typename</span> <a class="link" href="../../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a> <span class="special">=</span> <a class="link" href="../../pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy<></a> <span class="special">></span> 35<span class="keyword">class</span> <span class="identifier">hyperexponential_distribution</span><span class="special">;</span> 36 37<span class="keyword">typedef</span> <span class="identifier">hyperexponential_distribution</span><span class="special"><></span> <span class="identifier">hyperexponential</span><span class="special">;</span> 38 39<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">typename</span> <a class="link" href="../../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> 40<span class="keyword">class</span> <span class="identifier">hyperexponential_distribution</span> 41<span class="special">{</span> 42<span class="keyword">public</span><span class="special">:</span> 43 <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span> 44 <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span> 45 46 <span class="comment">// Constructors:</span> 47 <span class="identifier">hyperexponential_distribution</span><span class="special">();</span> <span class="comment">// Default.</span> 48 49 <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RateIterT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateIterT2</span><span class="special">></span> 50 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span> <span class="comment">// Default equal probabilities.</span> 51 <span class="identifier">RateIterT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_first</span><span class="special">,</span> 52 <span class="identifier">RateIterT2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_last</span><span class="special">);</span> <span class="comment">// Rates using Iterators.</span> 53 54 <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">ProbIterT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateIterT</span><span class="special">></span> 55 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">ProbIterT</span> <span class="identifier">prob_first</span><span class="special">,</span> <span class="identifier">ProbIterT</span> <span class="identifier">prob_last</span><span class="special">,</span> 56 <span class="identifier">RateIterT</span> <span class="identifier">rate_first</span><span class="special">,</span> <span class="identifier">RateIterT</span> <span class="identifier">rate_last</span><span class="special">);</span> <span class="comment">// Iterators.</span> 57 58 <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">ProbRangeT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateRangeT</span><span class="special">></span> 59 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">ProbRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">prob_range</span><span class="special">,</span> 60 <span class="identifier">RateRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_range</span><span class="special">);</span> <span class="comment">// Ranges.</span> 61 62 <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RateRangeT</span><span class="special">></span> 63 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">RateRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_range</span><span class="special">);</span> 64 65 <span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_CXX11_HDR_INITIALIZER_LIST</span><span class="special">)</span> <span class="comment">// C++11 initializer lists supported.</span> 66 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l1</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l2</span><span class="special">);</span> 67 <span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l1</span><span class="special">);</span> 68 <span class="preprocessor">#endif</span> 69 70 <span class="comment">// Accessors:</span> 71 <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">num_phases</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 72 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">probabilities</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 73 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">rates</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 74<span class="special">};</span> 75 76<span class="special">}}</span> <span class="comment">// namespaces</span> 77</pre> 78<div class="note"><table border="0" summary="Note"> 79<tr> 80<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 81<th align="left">Note</th> 82</tr> 83<tr><td align="left" valign="top"><p> 84 An implementation-defined mechanism is provided to avoid ambiguity between 85 constructors accepting ranges, iterators and constants as parameters. 86 This should be transparent to the user. See below and the header file 87 hyperexponential.hpp for details and explanatory comments. 88 </p></td></tr> 89</table></div> 90<p> 91 The class type <code class="computeroutput"><span class="identifier">hyperexponential_distribution</span></code> 92 represents a <a href="http://en.wikipedia.org/wiki/Hyperexponential_distribution" target="_top">hyperexponential 93 distribution</a>. 94 </p> 95<p> 96 A <span class="emphasis"><em>k</em></span>-phase hyperexponential distribution is a <a href="http://en.wikipedia.org/wiki/Continuous_probability_distribution" target="_top">continuous 97 probability distribution</a> obtained as a mixture of <span class="emphasis"><em>k</em></span> 98 <a class="link" href="exp_dist.html" title="Exponential Distribution">Exponential Distribution</a>s. 99 It is also referred to as <span class="emphasis"><em>mixed exponential distribution</em></span> 100 or parallel <span class="emphasis"><em>k-phase exponential distribution</em></span>. 101 </p> 102<p> 103 A <span class="emphasis"><em>k</em></span>-phase hyperexponential distribution is characterized 104 by two parameters, namely a <span class="emphasis"><em>phase probability vector</em></span> 105 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(α<sub>1</sub>,...,α<sub>k</sub>)</em></span> and a 106 <span class="emphasis"><em>rate vector</em></span> <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(λ<sub>1</sub>,...,λ<sub>k</sub>)</em></span>. 107 </p> 108<p> 109 The <a href="http://en.wikipedia.org/wiki/Probability_density_function" target="_top">probability 110 density function</a> for random variate <span class="emphasis"><em>x</em></span> in a 111 hyperexponential distribution is given by: 112 </p> 113<div class="blockquote"><blockquote class="blockquote"><p> 114 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_pdf.svg"></span> 115 116 </p></blockquote></div> 117<p> 118 The following graph illustrates the PDF of the hyperexponential distribution 119 with five different parameters, namely: 120 </p> 121<div class="orderedlist"><ol class="orderedlist" type="1"> 122<li class="listitem"> 123 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(1.0)</em></span> and <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(1.0)</em></span> (which degenerates to a simple 124 exponential distribution), 125 </li> 126<li class="listitem"> 127 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.1, 0.9)</em></span> and 128 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.5)</em></span>, 129 </li> 130<li class="listitem"> 131 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.9, 0.1)</em></span> and 132 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.5)</em></span>, 133 </li> 134<li class="listitem"> 135 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.2, 0.3, 0.5)</em></span> 136 and <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.0, 1.5)</em></span>, 137 </li> 138<li class="listitem"> 139 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.5, 0.3, 0.2)</em></span> 140 and <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.0, 1.5)</em></span>. 141 </li> 142</ol></div> 143<div class="blockquote"><blockquote class="blockquote"><p> 144 <span class="inlinemediaobject"><img src="../../../../graphs/hyperexponential_pdf.svg" align="middle"></span> 145 146 </p></blockquote></div> 147<p> 148 Also, the following graph illustrates the PDF of the hyperexponential distribution 149 (solid lines) where only the <span class="emphasis"><em>phase probability vector</em></span> 150 changes together with the PDF of the two limiting exponential distributions 151 (dashed lines): 152 </p> 153<div class="orderedlist"><ol class="orderedlist" type="1"> 154<li class="listitem"> 155 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.1, 0.9)</em></span> and 156 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.5)</em></span>, 157 </li> 158<li class="listitem"> 159 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.6, 0.4)</em></span> and 160 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.5)</em></span>, 161 </li> 162<li class="listitem"> 163 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.9, 0.1)</em></span> and 164 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.5, 1.5)</em></span>, 165 </li> 166<li class="listitem"> 167 Exponential distribution with parameter <span class="emphasis"><em>λ=0.5</em></span>, 168 </li> 169<li class="listitem"> 170 Exponential distribution with parameter <span class="emphasis"><em>λ=1.5</em></span>. 171 </li> 172</ol></div> 173<p> 174 As expected, as the first element <span class="emphasis"><em>α<sub>1</sub></em></span> of the <span class="emphasis"><em>phase 175 probability vector</em></span> approaches to <span class="emphasis"><em>1</em></span> (or, 176 equivalently, <span class="emphasis"><em>α<sub>2</sub></em></span> approaches to <span class="emphasis"><em>0</em></span>), 177 the resulting hyperexponential distribution nears the exponential distribution 178 with parameter <span class="emphasis"><em>λ=0.5</em></span>. Conversely, as the first element 179 <span class="emphasis"><em>α<sub>2</sub></em></span> of the <span class="emphasis"><em>phase probability vector</em></span> 180 approaches to <span class="emphasis"><em>1</em></span> (or, equivalently, <span class="emphasis"><em>α<sub>1</sub></em></span> 181 approaches to <span class="emphasis"><em>0</em></span>), the resulting hyperexponential distribution 182 nears the exponential distribution with parameter <span class="emphasis"><em>λ=1.5</em></span>. 183 </p> 184<div class="blockquote"><blockquote class="blockquote"><p> 185 <span class="inlinemediaobject"><img src="../../../../graphs/hyperexponential_pdf_samerate.svg" align="middle"></span> 186 187 </p></blockquote></div> 188<p> 189 Finally, the following graph compares the PDF of the hyperexponential distribution 190 with different number of phases but with the same mean value equal to 191 <span class="emphasis"><em>2</em></span>: 192 </p> 193<div class="orderedlist"><ol class="orderedlist" type="1"> 194<li class="listitem"> 195 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(1.0)</em></span> and <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(2.0)</em></span> (which degenerates to a simple 196 exponential distribution), 197 </li> 198<li class="listitem"> 199 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.5, 0.5)</em></span> and 200 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.3, 1.5)</em></span>, 201 </li> 202<li class="listitem"> 203 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(1.0/3.0, 1.0/3.0, 1.0/3.0)</em></span> 204 and <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(0.2, 1.5, 3.0)</em></span>, 205 </li> 206</ol></div> 207<div class="blockquote"><blockquote class="blockquote"><p> 208 <span class="inlinemediaobject"><img src="../../../../graphs/hyperexponential_pdf_samemean.svg" align="middle"></span> 209 210 </p></blockquote></div> 211<p> 212 As can be noted, even if the three distributions have the same mean value, 213 the two hyperexponential distributions have a <span class="emphasis"><em>longer</em></span> 214 tail with respect to the one of the exponential distribution. Indeed, the 215 hyperexponential distribution has a larger variability than the exponential 216 distribution, thus resulting in a <a href="http://en.wikipedia.org/wiki/Coefficient_of_variation" target="_top">Coefficient 217 of Variation</a> greater than <span class="emphasis"><em>1</em></span> (as opposed to 218 the one of the exponential distribution which is exactly <span class="emphasis"><em>1</em></span>). 219 </p> 220<h4> 221<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h0"></a> 222 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.applications"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.applications">Applications</a> 223 </h4> 224<p> 225 A <span class="emphasis"><em>k</em></span>-phase hyperexponential distribution is frequently 226 used in <a href="http://en.wikipedia.org/wiki/Queueing_theory" target="_top">queueing 227 theory</a> to model the distribution of the superposition of <span class="emphasis"><em>k</em></span> 228 independent events, like, for instance, the service time distribution of 229 a queueing station with <span class="emphasis"><em>k</em></span> servers in parallel where 230 the <span class="emphasis"><em>i</em></span>-th server is chosen with probability <span class="emphasis"><em>α<sub>i</sub></em></span> 231 and its service time distribution is an exponential distribution with rate 232 <span class="emphasis"><em>λ<sub>i</sub></em></span> (Allen,1990; Papadopolous et al.,1993; Trivedi,2002). 233 </p> 234<p> 235 For instance, CPUs service-time distribution in a computing system has 236 often been observed to possess such a distribution (Rosin,1965). Also, 237 the arrival of different types of customer to a single queueing station 238 is often modeled as a hyperexponential distribution (Papadopolous et al.,1993). 239 Similarly, if a product manufactured in several parallel assembly lines 240 and the outputs are merged, the failure density of the overall product 241 is likely to be hyperexponential (Trivedi,2002). 242 </p> 243<p> 244 Finally, since the hyperexponential distribution exhibits a high Coefficient 245 of Variation (CoV), that is a CoV > 1, it is especially suited to fit 246 empirical data with large CoV (Feitelson,2014; Wolski et al.,2013) and 247 to approximate <a href="http://en.wikipedia.org/wiki/Long_tail" target="_top">long-tail 248 probability distributions</a> (Feldmann et al.,1998). 249 </p> 250<h4> 251<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h1"></a> 252 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.related_distributions"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.related_distributions">Related 253 distributions</a> 254 </h4> 255<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 256<li class="listitem"> 257 When the number of phases <span class="emphasis"><em>k</em></span> is equal to <code class="computeroutput"><span class="number">1</span></code>, the hyperexponential distribution 258 is simply an <a class="link" href="exp_dist.html" title="Exponential Distribution">Exponential 259 Distribution</a>. 260 </li> 261<li class="listitem"> 262 When the <span class="emphasis"><em>k</em></span> rates are all equal to <span class="emphasis"><em>λ</em></span>, 263 the hyperexponential distribution is simple an <a class="link" href="exp_dist.html" title="Exponential Distribution">Exponential 264 Distribution</a> with rate <span class="emphasis"><em>λ</em></span>. 265 </li> 266</ul></div> 267<h4> 268<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h2"></a> 269 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.examples"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.examples">Examples</a> 270 </h4> 271<h5> 272<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h3"></a> 273 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.lifetime_of_appliances"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.lifetime_of_appliances">Lifetime 274 of Appliances</a> 275 </h5> 276<p> 277 Suppose a customer is buying an appliance and is choosing at random between 278 an appliance with average lifetime of 10 years and an appliance with average 279 lifetime of 12 years. Assuming the lifetime of this appliance follows an 280 exponential distribution, the lifetime distribution of the purchased appliance 281 can be modeled as a hyperexponential distribution with phase probability 282 vector <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(1/2,1/2)</em></span> 283 and rate vector <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(1/10,1/12)</em></span> 284 (Wolfram,2014). 285 </p> 286<p> 287 In the rest of this section, we provide an example C++ implementation for 288 computing the average lifetime and the probability that the appliance will 289 work for more than 15 years. 290 </p> 291<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">hyperexponential</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 292<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span> 293<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> 294<span class="special">{</span> 295 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10.0</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12.0</span> <span class="special">};</span> 296 297 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span> <span class="identifier">he</span><span class="special">(</span><span class="identifier">rates</span><span class="special">);</span> 298 299 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Average lifetime: "</span> 300 <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">mean</span><span class="special">(</span><span class="identifier">he</span><span class="special">)</span> 301 <span class="special"><<</span> <span class="string">" years"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 302 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability that the appliance will work for more than 15 years: "</span> 303 <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">he</span><span class="special">,</span> <span class="number">15.0</span><span class="special">))</span> 304 <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 305<span class="special">}</span> 306</pre> 307<p> 308 The resulting output is: 309 </p> 310<pre class="programlisting"><span class="identifier">Average</span> <span class="identifier">lifetime</span><span class="special">:</span> <span class="number">11</span> <span class="identifier">years</span> 311<span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">the</span> <span class="identifier">appliance</span> <span class="identifier">will</span> <span class="identifier">work</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">15</span> <span class="identifier">years</span><span class="special">:</span> <span class="number">0.254817</span> 312</pre> 313<h5> 314<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h4"></a> 315 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.workloads_of_private_cloud_compu"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.workloads_of_private_cloud_compu">Workloads 316 of Private Cloud Computing Systems</a> 317 </h5> 318<p> 319 <a href="http://en.wikipedia.org/wiki/Cloud_computing" target="_top">Cloud computing</a> 320 has become a popular metaphor for dynamic and secure self-service access 321 to computational and storage capabilities. In (Wolski et al.,2013), the 322 authors analyze and model workloads gathered from enterprise-operated commercial 323 <a href="http://en.wikipedia.org/wiki/Cloud_computing#Private_cloud" target="_top">private 324 clouds</a> and show that 3-phase hyperexponential distributions (fitted 325 using the <a href="http://en.wikipedia.org/wiki/Expectation%E2%80%93maximization_algorithm" target="_top">Expectation 326 Maximization algorithm</a>) capture workload attributes accurately. 327 </p> 328<p> 329 In this type of computing system, user requests consist in demanding the 330 provisioning of one or more <a href="http://en.wikipedia.org/wiki/Virtual_machine" target="_top">Virtual 331 Machines</a> (VMs). In particular, in (Wolski et al.,2013) the workload 332 experienced by each cloud system is a function of four distributions, one 333 for each of the following workload attributes: 334 </p> 335<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 336<li class="listitem"> 337 <span class="emphasis"><em>Request Interarrival Time</em></span>: the amount of time 338 until the next request, 339 </li> 340<li class="listitem"> 341 <span class="emphasis"><em>VM Lifetime</em></span>: the time duration over which a VM 342 is provisioned to a physical machine, 343 </li> 344<li class="listitem"> 345 <span class="emphasis"><em>Request Size</em></span>: the number of VMs in the request, 346 and 347 </li> 348<li class="listitem"> 349 <span class="emphasis"><em>Core Count</em></span>: the CPU core count requested for each 350 VM. 351 </li> 352</ul></div> 353<p> 354 The authors assume that all VMs in a request have the same core count, 355 but request sizes and core counts can vary from request to request. Moreover, 356 all VMs within a request are assumed to have the same lifetime. Given these 357 assumptions, the authors build a statistical model for the request interarrival 358 time and VM lifetime attributes by fitting their respective data to a 3-phase 359 hyperexponential distribution. 360 </p> 361<p> 362 In the following table, we show the sample mean and standard deviation 363 (SD), in seconds, of the request interarrival time and of the VM lifetime 364 distributions of the three datasets collected by authors: 365 </p> 366<div class="informaltable"><table class="table"> 367<colgroup> 368<col> 369<col> 370<col> 371<col> 372</colgroup> 373<thead><tr> 374<th> 375 <p> 376 Dataset 377 </p> 378 </th> 379<th> 380 <p> 381 Mean Request Interarrival Time (SD) 382 </p> 383 </th> 384<th> 385 <p> 386 Mean Multi-core VM Lifetime (SD) 387 </p> 388 </th> 389<th> 390 <p> 391 Mean Single-core VM Lifetime (SD) 392 </p> 393 </th> 394</tr></thead> 395<tbody> 396<tr> 397<td> 398 <p> 399 DS1 400 </p> 401 </td> 402<td> 403 <p> 404 2202.1 (2.2e+04) 405 </p> 406 </td> 407<td> 408 <p> 409 257173 (4.6e+05) 410 </p> 411 </td> 412<td> 413 <p> 414 28754.4 (1.6e+05) 415 </p> 416 </td> 417</tr> 418<tr> 419<td> 420 <p> 421 DS2 422 </p> 423 </td> 424<td> 425 <p> 426 41285.7 (1.1e+05) 427 </p> 428 </td> 429<td> 430 <p> 431 144669.0 (7.9e+05) 432 </p> 433 </td> 434<td> 435 <p> 436 599815.0 (1.7e+06) 437 </p> 438 </td> 439</tr> 440<tr> 441<td> 442 <p> 443 DS3 444 </p> 445 </td> 446<td> 447 <p> 448 11238.8 (3.0e+04) 449 </p> 450 </td> 451<td> 452 <p> 453 30739.2 (1.6e+05) 454 </p> 455 </td> 456<td> 457 <p> 458 44447.8 (2.2e+05) 459 </p> 460 </td> 461</tr> 462</tbody> 463</table></div> 464<p> 465 Whereas in the following table we show the hyperexponential distribution 466 parameters resulting from the fit: 467 </p> 468<div class="informaltable"><table class="table"> 469<colgroup> 470<col> 471<col> 472<col> 473<col> 474</colgroup> 475<thead><tr> 476<th> 477 <p> 478 Dataset 479 </p> 480 </th> 481<th> 482 <p> 483 Request Interarrival Time 484 </p> 485 </th> 486<th> 487 <p> 488 Multi-core VM Lifetime 489 </p> 490 </th> 491<th> 492 <p> 493 Single-core VM Lifetime 494 </p> 495 </th> 496</tr></thead> 497<tbody> 498<tr> 499<td> 500 <p> 501 DS1 502 </p> 503 </td> 504<td> 505 <p> 506 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.34561,0.08648,0.56791), 507 <span class="bold"><strong>λ</strong></span>=(0.008,0.00005,0.02894)</em></span> 508 </p> 509 </td> 510<td> 511 <p> 512 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.24667,0.37948,0.37385), 513 <span class="bold"><strong>λ</strong></span>=(0.00004,0.000002,0.00059)</em></span> 514 </p> 515 </td> 516<td> 517 <p> 518 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.09325,0.22251,0.68424), 519 <span class="bold"><strong>λ</strong></span>=(0.000003,0.00109,0.00109)</em></span> 520 </p> 521 </td> 522</tr> 523<tr> 524<td> 525 <p> 526 DS2 527 </p> 528 </td> 529<td> 530 <p> 531 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.38881,0.18227,0.42892), 532 <span class="bold"><strong>λ</strong></span>=(0.000006,0.05228,0.00081)</em></span> 533 </p> 534 </td> 535<td> 536 <p> 537 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.42093,0.43960,0.13947), 538 <span class="bold"><strong>λ</strong></span>=(0.00186,0.00008,0.0000008)</em></span> 539 </p> 540 </td> 541<td> 542 <p> 543 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.44885,0.30675,0.2444), 544 <span class="bold"><strong>λ</strong></span>=(0.00143,0.00005,0.0000004)</em></span> 545 </p> 546 </td> 547</tr> 548<tr> 549<td> 550 <p> 551 DS3 552 </p> 553 </td> 554<td> 555 <p> 556 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.39442,0.24644,0.35914), 557 <span class="bold"><strong>λ</strong></span>=(0.00030,0.00003,0.00257)</em></span> 558 </p> 559 </td> 560<td> 561 <p> 562 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.37621,0.14838,0.47541), 563 <span class="bold"><strong>λ</strong></span>=(0.00498,0.000005,0.00022)</em></span> 564 </p> 565 </td> 566<td> 567 <p> 568 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(0.34131,0.12544,0.53325), 569 <span class="bold"><strong>λ</strong></span>=(0.000297,0.000003,0.00410)</em></span> 570 </p> 571 </td> 572</tr> 573</tbody> 574</table></div> 575<p> 576 In the rest of this section, we provide an example C++ implementation for 577 computing some statistical properties of the fitted distributions for each 578 of the analyzed dataset. 579 </p> 580<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 581<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span> 582<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span> 583 584<span class="keyword">struct</span> <span class="identifier">ds_info</span> 585<span class="special">{</span> 586 <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> 587 <span class="keyword">double</span> <span class="identifier">iat_sample_mean</span><span class="special">;</span> 588 <span class="keyword">double</span> <span class="identifier">iat_sample_sd</span><span class="special">;</span> 589 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span> <span class="identifier">iat_he</span><span class="special">;</span> 590 <span class="keyword">double</span> <span class="identifier">multi_lt_sample_mean</span><span class="special">;</span> 591 <span class="keyword">double</span> <span class="identifier">multi_lt_sample_sd</span><span class="special">;</span> 592 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span> <span class="identifier">multi_lt_he</span><span class="special">;</span> 593 <span class="keyword">double</span> <span class="identifier">single_lt_sample_mean</span><span class="special">;</span> 594 <span class="keyword">double</span> <span class="identifier">single_lt_sample_sd</span><span class="special">;</span> 595 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span> <span class="identifier">single_lt_he</span><span class="special">;</span> 596<span class="special">};</span> 597 598<span class="comment">// DS1 dataset</span> 599<span class="identifier">ds_info</span> <span class="identifier">make_ds1</span><span class="special">()</span> 600<span class="special">{</span> 601 <span class="identifier">ds_info</span> <span class="identifier">ds</span><span class="special">;</span> 602 603 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">name</span> <span class="special">=</span> <span class="string">"DS1"</span><span class="special">;</span> 604 605 <span class="comment">// VM interarrival time distribution</span> 606 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.34561</span><span class="special">,</span><span class="number">0.08648</span><span class="special">,</span><span class="number">0.56791</span> <span class="special">};</span> 607 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.0008</span><span class="special">,</span><span class="number">0.00005</span><span class="special">,</span><span class="number">0.02894</span> <span class="special">};</span> 608 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_mean</span> <span class="special">=</span> <span class="number">2202.1</span><span class="special">;</span> 609 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_sd</span> <span class="special">=</span> <span class="number">2.2e+4</span><span class="special">;</span> 610 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">iat_fit_probs</span><span class="special">,</span> <span class="identifier">iat_fit_rates</span><span class="special">);</span> 611 612 <span class="comment">// Multi-core VM lifetime distribution</span> 613 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.24667</span><span class="special">,</span><span class="number">0.37948</span><span class="special">,</span><span class="number">0.37385</span> <span class="special">};</span> 614 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.00004</span><span class="special">,</span><span class="number">0.000002</span><span class="special">,</span><span class="number">0.00059</span> <span class="special">};</span> 615 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_mean</span> <span class="special">=</span> <span class="number">257173</span><span class="special">;</span> 616 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_sd</span> <span class="special">=</span> <span class="number">4.6e+5</span><span class="special">;</span> 617 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">multi_lt_fit_probs</span><span class="special">,</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">);</span> 618 619 <span class="comment">// Single-core VM lifetime distribution</span> 620 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.09325</span><span class="special">,</span><span class="number">0.22251</span><span class="special">,</span><span class="number">0.68424</span> <span class="special">};</span> 621 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.000003</span><span class="special">,</span><span class="number">0.00109</span><span class="special">,</span><span class="number">0.00109</span> <span class="special">};</span> 622 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_mean</span> <span class="special">=</span> <span class="number">28754.4</span><span class="special">;</span> 623 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_sd</span> <span class="special">=</span> <span class="number">1.6e+5</span><span class="special">;</span> 624 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">single_lt_fit_probs</span><span class="special">,</span> <span class="identifier">single_lt_fit_rates</span><span class="special">);</span> 625 626 <span class="keyword">return</span> <span class="identifier">ds</span><span class="special">;</span> 627<span class="special">}</span> 628 629<span class="comment">// DS2 dataset</span> 630<span class="identifier">ds_info</span> <span class="identifier">make_ds2</span><span class="special">()</span> 631<span class="special">{</span> 632 <span class="identifier">ds_info</span> <span class="identifier">ds</span><span class="special">;</span> 633 634 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">name</span> <span class="special">=</span> <span class="string">"DS2"</span><span class="special">;</span> 635 636 <span class="comment">// VM interarrival time distribution</span> 637 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.38881</span><span class="special">,</span><span class="number">0.18227</span><span class="special">,</span><span class="number">0.42892</span> <span class="special">};</span> 638 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.000006</span><span class="special">,</span><span class="number">0.05228</span><span class="special">,</span><span class="number">0.00081</span> <span class="special">};</span> 639 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_mean</span> <span class="special">=</span> <span class="number">41285.7</span><span class="special">;</span> 640 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_sd</span> <span class="special">=</span> <span class="number">1.1e+05</span><span class="special">;</span> 641 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">iat_fit_probs</span><span class="special">,</span> <span class="identifier">iat_fit_rates</span><span class="special">);</span> 642 643 <span class="comment">// Multi-core VM lifetime distribution</span> 644 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.42093</span><span class="special">,</span><span class="number">0.43960</span><span class="special">,</span><span class="number">0.13947</span> <span class="special">};</span> 645 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.00186</span><span class="special">,</span><span class="number">0.00008</span><span class="special">,</span><span class="number">0.0000008</span> <span class="special">};</span> 646 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_mean</span> <span class="special">=</span> <span class="number">144669.0</span><span class="special">;</span> 647 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_sd</span> <span class="special">=</span> <span class="number">7.9e+05</span><span class="special">;</span> 648 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">multi_lt_fit_probs</span><span class="special">,</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">);</span> 649 650 <span class="comment">// Single-core VM lifetime distribution</span> 651 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.44885</span><span class="special">,</span><span class="number">0.30675</span><span class="special">,</span><span class="number">0.2444</span> <span class="special">};</span> 652 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.00143</span><span class="special">,</span><span class="number">0.00005</span><span class="special">,</span><span class="number">0.0000004</span> <span class="special">};</span> 653 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_mean</span> <span class="special">=</span> <span class="number">599815.0</span><span class="special">;</span> 654 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_sd</span> <span class="special">=</span> <span class="number">1.7e+06</span><span class="special">;</span> 655 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">single_lt_fit_probs</span><span class="special">,</span> <span class="identifier">single_lt_fit_rates</span><span class="special">);</span> 656 657 <span class="keyword">return</span> <span class="identifier">ds</span><span class="special">;</span> 658<span class="special">}</span> 659 660<span class="comment">// DS3 dataset</span> 661<span class="identifier">ds_info</span> <span class="identifier">make_ds3</span><span class="special">()</span> 662<span class="special">{</span> 663 <span class="identifier">ds_info</span> <span class="identifier">ds</span><span class="special">;</span> 664 665 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">name</span> <span class="special">=</span> <span class="string">"DS3"</span><span class="special">;</span> 666 667 <span class="comment">// VM interarrival time distribution</span> 668 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.39442</span><span class="special">,</span><span class="number">0.24644</span><span class="special">,</span><span class="number">0.35914</span> <span class="special">};</span> 669 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">iat_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.00030</span><span class="special">,</span><span class="number">0.00003</span><span class="special">,</span><span class="number">0.00257</span> <span class="special">};</span> 670 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_mean</span> <span class="special">=</span> <span class="number">11238.8</span><span class="special">;</span> 671 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_sample_sd</span> <span class="special">=</span> <span class="number">3.0e+04</span><span class="special">;</span> 672 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">iat_fit_probs</span><span class="special">,</span> <span class="identifier">iat_fit_rates</span><span class="special">);</span> 673 674 <span class="comment">// Multi-core VM lifetime distribution</span> 675 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.37621</span><span class="special">,</span><span class="number">0.14838</span><span class="special">,</span><span class="number">0.47541</span> <span class="special">};</span> 676 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.00498</span><span class="special">,</span><span class="number">0.000005</span><span class="special">,</span><span class="number">0.00022</span> <span class="special">};</span> 677 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_mean</span> <span class="special">=</span> <span class="number">30739.2</span><span class="special">;</span> 678 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_sample_sd</span> <span class="special">=</span> <span class="number">1.6e+05</span><span class="special">;</span> 679 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">multi_lt_fit_probs</span><span class="special">,</span> <span class="identifier">multi_lt_fit_rates</span><span class="special">);</span> 680 681 <span class="comment">// Single-core VM lifetime distribution</span> 682 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_probs</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.34131</span><span class="special">,</span><span class="number">0.12544</span><span class="special">,</span><span class="number">0.53325</span> <span class="special">};</span> 683 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">single_lt_fit_rates</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.000297</span><span class="special">,</span><span class="number">0.000003</span><span class="special">,</span><span class="number">0.00410</span> <span class="special">};</span> 684 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_mean</span> <span class="special">=</span> <span class="number">44447.8</span><span class="special">;</span> 685 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_sample_sd</span> <span class="special">=</span> <span class="number">2.2e+05</span><span class="special">;</span> 686 <span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">hyperexponential</span><span class="special">(</span><span class="identifier">single_lt_fit_probs</span><span class="special">,</span> <span class="identifier">single_lt_fit_rates</span><span class="special">);</span> 687 688 <span class="keyword">return</span> <span class="identifier">ds</span><span class="special">;</span> 689<span class="special">}</span> 690 691<span class="keyword">void</span> <span class="identifier">print_fitted</span><span class="special">(</span><span class="identifier">ds_info</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">ds</span><span class="special">)</span> 692<span class="special">{</span> 693 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">secs_in_a_hour</span> <span class="special">=</span> <span class="number">3600</span><span class="special">;</span> 694 <span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">secs_in_a_month</span> <span class="special">=</span> <span class="number">30</span> <span class="special">*</span> <span class="number">24</span> <span class="special">*</span> <span class="identifier">secs_in_a_hour</span><span class="special">;</span> 695 696 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"### "</span> <span class="special"><<</span> <span class="identifier">ds</span><span class="special">.</span><span class="identifier">name</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 697 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* Fitted Request Interarrival Time"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 698 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Mean (SD): "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">mean</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" ("</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">standard_deviation</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">") seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 699 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - 99th Percentile: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span><span class="special">,</span> <span class="number">0.99</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 700 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will arrive within 30 minutes: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span><span class="special">,</span> <span class="identifier">secs_in_a_hour</span> <span class="special">/</span> <span class="number">2.0</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 701 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will arrive after 1 hour: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">iat_he</span><span class="special">,</span> <span class="identifier">secs_in_a_hour</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 702 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* Fitted Multi-core VM Lifetime"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 703 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Mean (SD): "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">mean</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" ("</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">standard_deviation</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">") seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 704 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - 99th Percentile: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span><span class="special">,</span> <span class="number">0.99</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 705 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will last for less than 1 month: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span><span class="special">,</span> <span class="identifier">secs_in_a_month</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 706 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will last for more than 3 months: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">multi_lt_he</span><span class="special">,</span> <span class="number">3.0</span><span class="special">*</span><span class="identifier">secs_in_a_month</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 707 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* Fitted Single-core VM Lifetime"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 708 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Mean (SD): "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">mean</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" ("</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">standard_deviation</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span><span class="special">)</span> <span class="special"><<</span> <span class="string">") seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 709 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - 99th Percentile: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span><span class="special">,</span> <span class="number">0.99</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" seconds."</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 710 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will last for less than 1 month: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span><span class="special">,</span> <span class="identifier">secs_in_a_month</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 711 <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">" - Probability that a VM will last for more than 3 months: "</span> <span class="special"><<</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">ds</span><span class="special">.</span><span class="identifier">single_lt_he</span><span class="special">,</span> <span class="number">3.0</span><span class="special">*</span><span class="identifier">secs_in_a_month</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 712<span class="special">}</span> 713 714<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> 715<span class="special">{</span> 716 <span class="identifier">print_fitted</span><span class="special">(</span><span class="identifier">make_ds1</span><span class="special">());</span> 717 718 <span class="identifier">print_fitted</span><span class="special">(</span><span class="identifier">make_ds2</span><span class="special">());</span> 719 720 <span class="identifier">print_fitted</span><span class="special">(</span><span class="identifier">make_ds3</span><span class="special">());</span> 721<span class="special">}</span> 722</pre> 723<p> 724 The resulting output (with floating-point precision set to 2) is: 725 </p> 726<pre class="programlisting"><span class="special">###</span> <span class="identifier">DS1</span> 727<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Request</span> <span class="identifier">Interarrival</span> <span class="identifier">Time</span> 728 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">2.2e+03</span> <span class="special">(</span><span class="number">8.1e+03</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 729 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">4.3e+04</span> <span class="identifier">seconds</span><span class="special">.</span> 730 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">within</span> <span class="number">30</span> <span class="identifier">minutes</span><span class="special">:</span> <span class="number">0.84</span> 731 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">after</span> <span class="number">1</span> <span class="identifier">hour</span><span class="special">:</span> <span class="number">0.092</span> 732<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Multi</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 733 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">2e+05</span> <span class="special">(</span><span class="number">3.9e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 734 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">1.8e+06</span> <span class="identifier">seconds</span><span class="special">.</span> 735 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">1</span> 736 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">6.7e-08</span> 737<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Single</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 738 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">3.2e+04</span> <span class="special">(</span><span class="number">1.4e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 739 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">7.4e+05</span> <span class="identifier">seconds</span><span class="special">.</span> 740 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">1</span> 741 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">6.9e-12</span> 742<span class="special">###</span> <span class="identifier">DS2</span> 743<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Request</span> <span class="identifier">Interarrival</span> <span class="identifier">Time</span> 744 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">6.5e+04</span> <span class="special">(</span><span class="number">1.3e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 745 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">6.1e+05</span> <span class="identifier">seconds</span><span class="special">.</span> 746 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">within</span> <span class="number">30</span> <span class="identifier">minutes</span><span class="special">:</span> <span class="number">0.52</span> 747 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">after</span> <span class="number">1</span> <span class="identifier">hour</span><span class="special">:</span> <span class="number">0.4</span> 748<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Multi</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 749 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">1.8e+05</span> <span class="special">(</span><span class="number">6.4e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 750 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">3.3e+06</span> <span class="identifier">seconds</span><span class="special">.</span> 751 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">0.98</span> 752 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">0.00028</span> 753<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Single</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 754 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">6.2e+05</span> <span class="special">(</span><span class="number">1.6e+06</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 755 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">8e+06</span> <span class="identifier">seconds</span><span class="special">.</span> 756 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">0.91</span> 757 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">0.011</span> 758<span class="special">###</span> <span class="identifier">DS3</span> 759<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Request</span> <span class="identifier">Interarrival</span> <span class="identifier">Time</span> 760 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">9.7e+03</span> <span class="special">(</span><span class="number">2.2e+04</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 761 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">1.1e+05</span> <span class="identifier">seconds</span><span class="special">.</span> 762 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">within</span> <span class="number">30</span> <span class="identifier">minutes</span><span class="special">:</span> <span class="number">0.53</span> 763 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">arrive</span> <span class="identifier">after</span> <span class="number">1</span> <span class="identifier">hour</span><span class="special">:</span> <span class="number">0.36</span> 764<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Multi</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 765 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">3.2e+04</span> <span class="special">(</span><span class="number">1e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 766 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">5.4e+05</span> <span class="identifier">seconds</span><span class="special">.</span> 767 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">1</span> 768 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">1.9e-18</span> 769<span class="special">*</span> <span class="identifier">Fitted</span> <span class="identifier">Single</span><span class="special">-</span><span class="identifier">core</span> <span class="identifier">VM</span> <span class="identifier">Lifetime</span> 770 <span class="special">-</span> <span class="identifier">Mean</span> <span class="special">(</span><span class="identifier">SD</span><span class="special">):</span> <span class="number">4.3e+04</span> <span class="special">(</span><span class="number">1.6e+05</span><span class="special">)</span> <span class="identifier">seconds</span><span class="special">.</span> 771 <span class="special">-</span> <span class="number">99</span><span class="identifier">th</span> <span class="identifier">Percentile</span><span class="special">:</span> <span class="number">8.4e+05</span> <span class="identifier">seconds</span><span class="special">.</span> 772 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">1</span> <span class="identifier">month</span><span class="special">:</span> <span class="number">1</span> 773 <span class="special">-</span> <span class="identifier">Probability</span> <span class="identifier">that</span> <span class="identifier">a</span> <span class="identifier">VM</span> <span class="identifier">will</span> <span class="identifier">last</span> <span class="keyword">for</span> <span class="identifier">more</span> <span class="identifier">than</span> <span class="number">3</span> <span class="identifier">months</span><span class="special">:</span> <span class="number">9.3e-12</span> 774</pre> 775<div class="note"><table border="0" summary="Note"> 776<tr> 777<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 778<th align="left">Note</th> 779</tr> 780<tr><td align="left" valign="top"><p> 781 The above results differ from the ones shown in Tables III, V, and VII 782 of (Wolski et al.,2013). We carefully double-checked them with Wolfram 783 Mathematica 10, which confirmed our results. 784 </p></td></tr> 785</table></div> 786<h4> 787<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h5"></a> 788 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.member_functions"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.member_functions">Member 789 Functions</a> 790 </h4> 791<h5> 792<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h6"></a> 793 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.default_constructor"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.default_constructor">Default 794 Constructor</a> 795 </h5> 796<pre class="programlisting"><span class="identifier">hyperexponential_distribution</span><span class="special">();</span> 797</pre> 798<p> 799 Constructs a <span class="emphasis"><em>1</em></span>-phase hyperexponential distribution 800 (i.e., an exponential distribution) with rate <code class="computeroutput"><span class="number">1</span></code>. 801 </p> 802<h5> 803<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h7"></a> 804 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.constructor_from_iterators"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.constructor_from_iterators">Constructor 805 from Iterators</a> 806 </h5> 807<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">ProbIterT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateIterT</span><span class="special">></span> 808<span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">ProbIterT</span> <span class="identifier">prob_first</span><span class="special">,</span> <span class="identifier">ProbIterT</span> <span class="identifier">prob_last</span><span class="special">,</span> 809 <span class="identifier">RateIterT</span> <span class="identifier">rate_first</span><span class="special">,</span> <span class="identifier">RateIterT</span> <span class="identifier">rate_last</span><span class="special">);</span> 810</pre> 811<p> 812 Constructs a hyperexponential distribution with <span class="emphasis"><em>phase probability 813 vector</em></span> parameter given by the range defined by [<code class="computeroutput"><span class="identifier">prob_first</span></code>, <code class="computeroutput"><span class="identifier">prob_last</span></code>) 814 iterator pair, and <span class="emphasis"><em>rate vector</em></span> parameter given by 815 the range defined by the [<code class="computeroutput"><span class="identifier">rate_first</span></code>, 816 <code class="computeroutput"><span class="identifier">rate_last</span></code>) iterator pair. 817 </p> 818<h6> 819<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h8"></a> 820 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters">Parameters</a> 821 </h6> 822<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 823<li class="listitem"> 824 <code class="computeroutput"><span class="identifier">prob_first</span></code>, <code class="computeroutput"><span class="identifier">prob_last</span></code>: the range of non-negative 825 real elements representing the phase probabilities; elements are normalized 826 to sum to unity. 827 </li> 828<li class="listitem"> 829 <code class="computeroutput"><span class="identifier">rate_first</span></code>, <code class="computeroutput"><span class="identifier">rate_last</span></code>: the range of positive 830 elements representing the rates. 831 </li> 832</ul></div> 833<h6> 834<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h9"></a> 835 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements">Type 836 Requirements</a> 837 </h6> 838<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 839 <code class="computeroutput"><span class="identifier">ProbIterT</span></code>, <code class="computeroutput"><span class="identifier">RateIterT</span></code>: must meet the requirements 840 of the <a href="http://en.cppreference.com/w/cpp/concept/InputIterator" target="_top">InputIterator</a> 841 concept. 842 </li></ul></div> 843<h6> 844<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h10"></a> 845 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.example"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.example">Example</a> 846 </h6> 847<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">phase_prob</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.5</span> <span class="special">};</span> 848<span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">rates</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 849 850<span class="identifier">hyperexponential</span> <span class="identifier">he</span><span class="special">(</span><span class="identifier">phase_prob</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">phase_prob</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">rates</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">rates</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span> 851</pre> 852<h5> 853<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h11"></a> 854 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_ranges_contain"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_ranges_contain">Construction 855 from Ranges/Containers</a> 856 </h5> 857<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">ProbRangeT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateRangeT</span><span class="special">></span> 858<span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">ProbRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">prob_range</span><span class="special">,</span> 859 <span class="identifier">RateRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_range</span><span class="special">);</span> 860</pre> 861<p> 862 Constructs a hyperexponential distribution with <span class="emphasis"><em>phase probability 863 vector</em></span> parameter given by the range defined by <code class="computeroutput"><span class="identifier">prob_range</span></code>, and <span class="emphasis"><em>rate vector</em></span> 864 parameter given by the range defined by <code class="computeroutput"><span class="identifier">rate_range</span></code>. 865 </p> 866<div class="note"><table border="0" summary="Note"> 867<tr> 868<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 869<th align="left">Note</th> 870</tr> 871<tr><td align="left" valign="top"><p> 872 As an implementation detail, this constructor uses Boost's <a href="http://www.boost.org/doc/libs/release/libs/core/doc/html/core/enable_if.html" target="_top">enable_if/disable_if 873 mechanism</a> to disambiguate between this and other 2-argument constructors. 874 Refer to the source code for more details. 875 </p></td></tr> 876</table></div> 877<h6> 878<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h12"></a> 879 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters0"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters0">Parameters</a> 880 </h6> 881<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 882<li class="listitem"> 883 <code class="computeroutput"><span class="identifier">prob_range</span></code>: the range 884 of non-negative real elements representing the phase probabilities; 885 elements are normalized to sum to unity. 886 </li> 887<li class="listitem"> 888 <code class="computeroutput"><span class="identifier">rate_range</span></code>: the range 889 of positive real elements representing the rates. 890 </li> 891</ul></div> 892<h6> 893<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h13"></a> 894 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements0"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements0">Type 895 Requirements</a> 896 </h6> 897<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 898 <code class="computeroutput"><span class="identifier">ProbRangeT</span></code>, <code class="computeroutput"><span class="identifier">RateRangeT</span></code>: must meet the requirements 899 of the <a href="http://www.boost.org/doc/libs/release/libs/range/doc/html/range/concepts.html" target="_top">Range</a> 900 concept: that includes native C++ arrays, standard library containers, 901 or a std::pair or iterators. 902 </li></ul></div> 903<h6> 904<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h14"></a> 905 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.examples0"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.examples0">Examples</a> 906 </h6> 907<pre class="programlisting"><span class="comment">// We could be using any standard library container here... vector, deque, array, list etc:</span> 908<span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">phase_prob</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.5</span> <span class="special">};</span> 909<span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">rates</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 910 911<span class="identifier">hyperexponential</span> <span class="identifier">he1</span><span class="special">(</span><span class="identifier">phase_prob</span><span class="special">,</span> <span class="identifier">rates</span><span class="special">);</span> <span class="comment">// Construct from standard library container.</span> 912 913<span class="keyword">double</span> <span class="identifier">phase_probs2</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.5</span> <span class="special">};</span> 914<span class="keyword">double</span> <span class="identifier">rates2</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 915 916<span class="identifier">hyperexponential</span> <span class="identifier">he2</span><span class="special">(</span><span class="identifier">phase_probs2</span><span class="special">,</span> <span class="identifier">rates2</span><span class="special">);</span> <span class="comment">// Construct from native C++ array.</span> 917</pre> 918<h5> 919<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h15"></a> 920 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.construction_with_rates_iterator"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.construction_with_rates_iterator">Construction 921 with rates-iterators (and all phase probabilities equal)</a> 922 </h5> 923<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RateIterT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RateIterT2</span><span class="special">></span> 924<span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">RateIterT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_first</span><span class="special">,</span> 925 <span class="identifier">RateIterT2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_last</span><span class="special">);</span> 926</pre> 927<p> 928 Constructs a hyperexponential distribution with <span class="emphasis"><em>rate vector</em></span> 929 parameter given by the range defined by the [<code class="computeroutput"><span class="identifier">rate_first</span></code>, 930 <code class="computeroutput"><span class="identifier">rate_last</span></code>) iterator pair, 931 and <span class="emphasis"><em>phase probability vector</em></span> set to the equal phase 932 probabilities (i.e., to a vector of the same length <code class="computeroutput"><span class="identifier">n</span></code> 933 of the <span class="emphasis"><em>rate vector</em></span> and with each element set to <code class="computeroutput"><span class="number">1.0</span><span class="special">/</span><span class="identifier">n</span></code>). 934 </p> 935<div class="note"><table border="0" summary="Note"> 936<tr> 937<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 938<th align="left">Note</th> 939</tr> 940<tr><td align="left" valign="top"><p> 941 As an implementation detail, this constructor uses Boost's <a href="http://www.boost.org/doc/libs/release/libs/core/doc/html/core/enable_if.html" target="_top">enable_if/disable_if 942 mechanism</a> to disambiguate between this and other 2-argument constructors. 943 Refer to the source code for more details. 944 </p></td></tr> 945</table></div> 946<h6> 947<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h16"></a> 948 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters1"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters1">Parameters</a> 949 </h6> 950<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 951 <code class="computeroutput"><span class="identifier">rate_first</span></code>, <code class="computeroutput"><span class="identifier">rate_last</span></code>: the range of positive 952 elements representing the rates. 953 </li></ul></div> 954<h6> 955<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h17"></a> 956 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements1"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements1">Type 957 Requirements</a> 958 </h6> 959<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 960 <code class="computeroutput"><span class="identifier">RateIterT</span></code>, <code class="computeroutput"><span class="identifier">RateIterT2</span></code>: must meet the requirements 961 of the <a href="http://en.cppreference.com/w/cpp/concept/InputIterator" target="_top">InputIterator</a> 962 concept. 963 </li></ul></div> 964<h6> 965<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h18"></a> 966 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.example0"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.example0">Example</a> 967 </h6> 968<pre class="programlisting"><span class="comment">// We could be using any standard library container here... vector, deque, array, list etc:</span> 969<span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">rates</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 970 971<span class="identifier">hyperexponential</span> <span class="identifier">he</span><span class="special">(</span><span class="identifier">rates</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">rates</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span> 972 973<span class="identifier">BOOST_ASSERT</span><span class="special">(</span><span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">()[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">0.5</span><span class="special">);</span> <span class="comment">// Phase probabilities will be equal and normalised to unity.</span> 974</pre> 975<h5> 976<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h19"></a> 977 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_a_single_range"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_a_single_range">Construction 978 from a single range of rates (all phase probabilities will be equal)</a> 979 </h5> 980<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RateRangeT</span><span class="special">></span> 981<span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">RateRangeT</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rate_range</span><span class="special">);</span> 982</pre> 983<p> 984 Constructs a hyperexponential distribution with <span class="emphasis"><em>rate vector</em></span> 985 parameter given by the range defined by <code class="computeroutput"><span class="identifier">rate_range</span></code>, 986 and <span class="emphasis"><em>phase probability vector</em></span> set to the equal phase 987 probabilities (i.e., to a vector of the same length <code class="computeroutput"><span class="identifier">n</span></code> 988 of the <span class="emphasis"><em>rate vector</em></span> and with each element set to <code class="computeroutput"><span class="number">1.0</span><span class="special">/</span><span class="identifier">n</span></code>). 989 </p> 990<h6> 991<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h20"></a> 992 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters2"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters2">Parameters</a> 993 </h6> 994<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 995 <code class="computeroutput"><span class="identifier">rate_range</span></code>: the range 996 of positive real elements representing the rates. 997 </li></ul></div> 998<h6> 999<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h21"></a> 1000 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements2"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.type_requirements2">Type 1001 Requirements</a> 1002 </h6> 1003<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 1004 <code class="computeroutput"><span class="identifier">RateRangeT</span></code>: must meet 1005 the requirements of the <a href="http://www.boost.org/doc/libs/release/libs/range/doc/html/range/concepts.html" target="_top">Range</a> 1006 concept: this includes native C++ array, standard library containers, 1007 and a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> of iterators. 1008 </li></ul></div> 1009<h6> 1010<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h22"></a> 1011 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.examples1"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.examples1">Examples</a> 1012 </h6> 1013<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">rates</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 1014 1015<span class="identifier">hyperexponential</span> <span class="identifier">he</span><span class="special">(</span><span class="identifier">rates</span><span class="special">);</span> 1016 1017<span class="identifier">BOOST_ASSERT</span><span class="special">(</span><span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">()[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">0.5</span><span class="special">);</span> <span class="comment">// Phase probabilities will be equal and normalised to unity.</span> 1018</pre> 1019<h5> 1020<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h23"></a> 1021 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_initializer_li"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_initializer_li">Construction 1022 from Initializer lists</a> 1023 </h5> 1024<pre class="programlisting"><span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l1</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l2</span><span class="special">);</span> 1025</pre> 1026<p> 1027 Constructs a hyperexponential distribution with <span class="emphasis"><em>phase probability 1028 vector</em></span> parameter given by the <a href="http://en.cppreference.com/w/cpp/language/list_initialization" target="_top">brace-init-list</a> 1029 defined by <code class="computeroutput"><span class="identifier">l1</span></code>, and <span class="emphasis"><em>rate 1030 vector</em></span> parameter given by the <a href="http://en.cppreference.com/w/cpp/language/list_initialization" target="_top">brace-init-list</a> 1031 defined by <code class="computeroutput"><span class="identifier">l2</span></code>. 1032 </p> 1033<h6> 1034<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h24"></a> 1035 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters3"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters3">Parameters</a> 1036 </h6> 1037<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 1038<li class="listitem"> 1039 <code class="computeroutput"><span class="identifier">l1</span></code>: the brace-init-list 1040 of non-negative real elements representing the phase probabilities; 1041 elements are normalized to sum to unity. 1042 </li> 1043<li class="listitem"> 1044 <code class="computeroutput"><span class="identifier">l2</span></code>: the brace-init-list 1045 of positive real elements representing the rates. 1046 </li> 1047</ul></div> 1048<p> 1049 The number of elements of the phase probabilities list and the rates list 1050 must be the same. 1051 </p> 1052<h6> 1053<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h25"></a> 1054 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.example1"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.example1">Example</a> 1055 </h6> 1056<pre class="programlisting"><span class="identifier">hyperexponential</span> <span class="identifier">he</span> <span class="special">=</span> <span class="special">{</span> <span class="special">{</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.5</span> <span class="special">},</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">}</span> <span class="special">};</span> 1057</pre> 1058<h5> 1059<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h26"></a> 1060 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_a_single_initi"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.construction_from_a_single_initi">Construction 1061 from a single initializer list (all phase probabilities will be equal)</a> 1062 </h5> 1063<pre class="programlisting"><span class="identifier">hyperexponential_distribution</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">l1</span><span class="special">);</span> 1064</pre> 1065<p> 1066 Constructs a hyperexponential distribution with <span class="emphasis"><em>rate vector</em></span> 1067 parameter given by the <a href="http://en.cppreference.com/w/cpp/language/list_initialization" target="_top">brace-init-list</a> 1068 defined by <code class="computeroutput"><span class="identifier">l1</span></code>, and <span class="emphasis"><em>phase 1069 probability vector</em></span> set to the equal phase probabilities (i.e., 1070 to a vector of the same length <code class="computeroutput"><span class="identifier">n</span></code> 1071 of the <span class="emphasis"><em>rate vector</em></span> and with each element set to <code class="computeroutput"><span class="number">1.0</span><span class="special">/</span><span class="identifier">n</span></code>). 1072 </p> 1073<h6> 1074<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h27"></a> 1075 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.parameters4"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.parameters4">Parameters</a> 1076 </h6> 1077<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 1078 <code class="computeroutput"><span class="identifier">l1</span></code>: the brace-init-list 1079 of non-negative real elements representing the phase probabilities; 1080 they are normalized to ensure that they sum to unity. 1081 </li></ul></div> 1082<h6> 1083<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h28"></a> 1084 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.example2"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.example2">Example</a> 1085 </h6> 1086<pre class="programlisting"><span class="identifier">hyperexponential</span> <span class="identifier">he</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">10</span><span class="special">,</span> <span class="number">1.0</span> <span class="special">/</span> <span class="number">12</span> <span class="special">};</span> 1087 1088<span class="identifier">BOOST_ASSERT</span><span class="special">(</span><span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">()[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">0.5</span><span class="special">);</span> 1089</pre> 1090<h5> 1091<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h29"></a> 1092 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.accessors"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.accessors">Accessors</a> 1093 </h5> 1094<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">num_phases</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 1095</pre> 1096<p> 1097 Gets the number of phases of this distribution (the size of both the rate 1098 and probability vectors). 1099 </p> 1100<h6> 1101<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h30"></a> 1102 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.return_value"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.return_value">Return 1103 Value</a> 1104 </h6> 1105<p> 1106 An non-negative integer number representing the number of phases of this 1107 distribution. 1108 </p> 1109<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">probabilities</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 1110</pre> 1111<p> 1112 Gets the <span class="emphasis"><em>phase probability vector</em></span> parameter of this 1113 distribution. 1114 </p> 1115<div class="note"><table border="0" summary="Note"> 1116<tr> 1117<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td> 1118<th align="left">Note</th> 1119</tr> 1120<tr><td align="left" valign="top"><p> 1121 The returned probabilities are the <span class="bold"><strong>normalized</strong></span> 1122 versions of the probability parameter values passed at construction time. 1123 </p></td></tr> 1124</table></div> 1125<h6> 1126<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h31"></a> 1127 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.return_value0"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.return_value0">Return 1128 Value</a> 1129 </h6> 1130<p> 1131 A vector of non-negative real numbers representing the <span class="emphasis"><em>phase 1132 probability vector</em></span> parameter of this distribution. 1133 </p> 1134<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">></span> <span class="identifier">rates</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> 1135</pre> 1136<p> 1137 Gets the <span class="emphasis"><em>rate vector</em></span> parameter of this distribution. 1138 </p> 1139<h6> 1140<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h32"></a> 1141 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.return_value1"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.return_value1">Return 1142 Value</a> 1143 </h6> 1144<p> 1145 A vector of positive real numbers representing the <span class="emphasis"><em>rate vector</em></span> 1146 parameter of this distribution. 1147 </p> 1148<div class="warning"><table border="0" summary="Warning"> 1149<tr> 1150<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../../doc/src/images/warning.png"></td> 1151<th align="left">Warning</th> 1152</tr> 1153<tr><td align="left" valign="top"> 1154<p> 1155 The return type of these functions is a vector-by-value. This is deliberate 1156 as we wish to hide the actual container used internally which may be 1157 subject to future changes (for example to facilitate vectorization of 1158 the cdf code etc). Users should note that some code that might otherwise 1159 have been expected to work does not. For example, an attempt to output 1160 the (normalized) probabilities: 1161 </p> 1162<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">().</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">().</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">" "</span><span class="special">));</span> 1163</pre> 1164<p> 1165 fails at compile or runtime because iterator types are incompatible, 1166 but, for example, 1167 </p> 1168<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">()[</span><span class="number">0</span><span class="special">]</span> <span class="special"><<</span> <span class="char">' '</span> <span class="special"><<</span> <span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">()[</span><span class="number">1</span><span class="special">]</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> 1169</pre> 1170<p> 1171 outputs the expected values. 1172 </p> 1173<p> 1174 In general if you want to access a member of the returned container, 1175 then assign to a variable first, and then access those members: 1176 </p> 1177<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">he</span><span class="special">.</span><span class="identifier">probabilities</span><span class="special">();</span> 1178<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">t</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">" "</span><span class="special">));</span> 1179</pre> 1180</td></tr> 1181</table></div> 1182<h4> 1183<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h33"></a> 1184 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.non_member_accessor_functions"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.non_member_accessor_functions">Non-member 1185 Accessor Functions</a> 1186 </h4> 1187<p> 1188 All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member accessor 1189 functions</a> that are generic to all distributions are supported: 1190 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative Distribution Function</a>, 1191 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability Density Function</a>, 1192 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.quantile">Quantile</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.hazard">Hazard Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.chf">Cumulative Hazard Function</a>, 1193 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.median">median</a>, 1194 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mode">mode</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.variance">variance</a>, 1195 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.sd">standard deviation</a>, 1196 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>, 1197 <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.range">range</a> and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.support">support</a>. 1198 </p> 1199<p> 1200 The formulae for calculating these are shown in the table below. 1201 </p> 1202<h4> 1203<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h34"></a> 1204 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.accuracy"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.accuracy">Accuracy</a> 1205 </h4> 1206<p> 1207 The hyperexponential distribution is implemented in terms of the <a class="link" href="exp_dist.html" title="Exponential Distribution">Exponential Distribution</a> 1208 and as such should have very small errors, usually an <a href="http://en.wikipedia.org/wiki/Machine_epsilon" target="_top">epsilon</a> 1209 or few. 1210 </p> 1211<h4> 1212<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h35"></a> 1213 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.implementation"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.implementation">Implementation</a> 1214 </h4> 1215<p> 1216 In the following table: 1217 </p> 1218<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 1219<li class="listitem"> 1220 <span class="emphasis"><em><span class="bold"><strong>α</strong></span>=(α<sub>1</sub>,...,α<sub>k</sub>)</em></span> is 1221 the <span class="emphasis"><em>phase probability vector</em></span> parameter of the 1222 <span class="emphasis"><em>k</em></span>-phase hyperexponential distribution, 1223 </li> 1224<li class="listitem"> 1225 <span class="emphasis"><em><span class="bold"><strong>λ</strong></span>=(λ<sub>1</sub>,...,λ<sub>k</sub>)</em></span> is 1226 the <span class="emphasis"><em>rate vector</em></span> parameter of the <span class="emphasis"><em>k</em></span>-phase 1227 hyperexponential distribution, 1228 </li> 1229<li class="listitem"> 1230 <span class="emphasis"><em>x</em></span> is the random variate. 1231 </li> 1232</ul></div> 1233<div class="informaltable"><table class="table"> 1234<colgroup> 1235<col> 1236<col> 1237</colgroup> 1238<thead><tr> 1239<th> 1240 <p> 1241 Function 1242 </p> 1243 </th> 1244<th> 1245 <p> 1246 Implementation Notes 1247 </p> 1248 </th> 1249</tr></thead> 1250<tbody> 1251<tr> 1252<td> 1253 <p> 1254 support 1255 </p> 1256 </td> 1257<td> 1258 <p> 1259 <span class="emphasis"><em>x</em></span> ∈ [0,∞) 1260 </p> 1261 </td> 1262</tr> 1263<tr> 1264<td> 1265 <p> 1266 pdf 1267 </p> 1268 </td> 1269<td> 1270 <div class="blockquote"><blockquote class="blockquote"><p> 1271 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_pdf.svg"></span> 1272 1273 </p></blockquote></div> 1274 </td> 1275</tr> 1276<tr> 1277<td> 1278 <p> 1279 cdf 1280 </p> 1281 </td> 1282<td> 1283 <div class="blockquote"><blockquote class="blockquote"><p> 1284 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_cdf.svg"></span> 1285 1286 </p></blockquote></div> 1287 </td> 1288</tr> 1289<tr> 1290<td> 1291 <p> 1292 cdf complement 1293 </p> 1294 </td> 1295<td> 1296 <div class="blockquote"><blockquote class="blockquote"><p> 1297 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_ccdf.svg"></span> 1298 1299 </p></blockquote></div> 1300 </td> 1301</tr> 1302<tr> 1303<td> 1304 <p> 1305 quantile 1306 </p> 1307 </td> 1308<td> 1309 <p> 1310 No closed form available. Computed numerically. 1311 </p> 1312 </td> 1313</tr> 1314<tr> 1315<td> 1316 <p> 1317 quantile from the complement 1318 </p> 1319 </td> 1320<td> 1321 <p> 1322 No closed form available. Computed numerically. 1323 </p> 1324 </td> 1325</tr> 1326<tr> 1327<td> 1328 <p> 1329 mean 1330 </p> 1331 </td> 1332<td> 1333 <div class="blockquote"><blockquote class="blockquote"><p> 1334 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_mean.svg"></span> 1335 1336 </p></blockquote></div> 1337 </td> 1338</tr> 1339<tr> 1340<td> 1341 <p> 1342 variance 1343 </p> 1344 </td> 1345<td> 1346 <div class="blockquote"><blockquote class="blockquote"><p> 1347 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_variance.svg"></span> 1348 1349 </p></blockquote></div> 1350 </td> 1351</tr> 1352<tr> 1353<td> 1354 <p> 1355 mode 1356 </p> 1357 </td> 1358<td> 1359 <p> 1360 <code class="computeroutput"><span class="number">0</span></code> 1361 </p> 1362 </td> 1363</tr> 1364<tr> 1365<td> 1366 <p> 1367 skewness 1368 </p> 1369 </td> 1370<td> 1371 <div class="blockquote"><blockquote class="blockquote"><p> 1372 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_skewness.svg"></span> 1373 1374 </p></blockquote></div> 1375 </td> 1376</tr> 1377<tr> 1378<td> 1379 <p> 1380 kurtosis 1381 </p> 1382 </td> 1383<td> 1384 <div class="blockquote"><blockquote class="blockquote"><p> 1385 <span class="inlinemediaobject"><img src="../../../../equations/hyperexponential_kurtosis.svg"></span> 1386 1387 </p></blockquote></div> 1388 </td> 1389</tr> 1390<tr> 1391<td> 1392 <p> 1393 kurtosis excess 1394 </p> 1395 </td> 1396<td> 1397 <p> 1398 kurtosis <code class="computeroutput"><span class="special">-</span> <span class="number">3</span></code> 1399 </p> 1400 </td> 1401</tr> 1402</tbody> 1403</table></div> 1404<h4> 1405<a name="math_toolkit.dist_ref.dists.hyperexponential_dist.h36"></a> 1406 <span class="phrase"><a name="math_toolkit.dist_ref.dists.hyperexponential_dist.references"></a></span><a class="link" href="hyperexponential_dist.html#math_toolkit.dist_ref.dists.hyperexponential_dist.references">References</a> 1407 </h4> 1408<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 1409<li class="listitem"> 1410 A.O. Allen, <span class="emphasis"><em>Probability, Statistics, and Queuing Theory with 1411 Computer Science Applications, Second Edition</em></span>, Academic 1412 Press, 1990. 1413 </li> 1414<li class="listitem"> 1415 D.G. Feitelson, <span class="emphasis"><em>Workload Modeling for Computer Systems Performance 1416 Evaluation</em></span>, Cambridge University Press, 2014 1417 </li> 1418<li class="listitem"> 1419 A. Feldmann and W. Whitt, <span class="emphasis"><em>Fitting mixtures of exponentials 1420 to long-tail distributions to analyze network performance models</em></span>, 1421 Performance Evaluation 31(3-4):245, doi:10.1016/S0166-5316(97)00003-5, 1422 1998. 1423 </li> 1424<li class="listitem"> 1425 H.T. Papadopolous, C. Heavey and J. Browne, <span class="emphasis"><em>Queueing Theory 1426 in Manufacturing Systems Analysis and Design</em></span>, Chapman & 1427 Hall/CRC, 1993, p. 35. 1428 </li> 1429<li class="listitem"> 1430 R.F. Rosin, <span class="emphasis"><em>Determining a computing center environment</em></span>, 1431 Communications of the ACM 8(7):463-468, 1965. 1432 </li> 1433<li class="listitem"> 1434 K.S. Trivedi, <span class="emphasis"><em>Probability and Statistics with Reliability, 1435 Queueing, and Computer Science Applications</em></span>, John Wiley 1436 & Sons, Inc., 2002. 1437 </li> 1438<li class="listitem"> 1439 Wikipedia, <span class="emphasis"><em>Hyperexponential Distribution</em></span>, Online: 1440 <a href="http://en.wikipedia.org/wiki/Hyperexponential_distribution" target="_top">http://en.wikipedia.org/wiki/Hyperexponential_distribution</a>, 1441 2014 1442 </li> 1443<li class="listitem"> 1444 R. Wolski and J. Brevik, <span class="emphasis"><em>Using Parametric Models to Represent 1445 Private Cloud Workloads</em></span>, IEEE TSC, PrePrint, DOI: <a href="http://doi.ieeecomputersociety.org/10.1109/TSC.2013.48" target="_top">10.1109/TSC.2013.48</a>, 1446 2013. 1447 </li> 1448<li class="listitem"> 1449 Wolfram Mathematica, <span class="emphasis"><em>Hyperexponential Distribution</em></span>, 1450 Online: <a href="http://reference.wolfram.com/language/ref/HyperexponentialDistribution.html" target="_top">http://reference.wolfram.com/language/ref/HyperexponentialDistribution.html</a>, 1451 2014. 1452 </li> 1453</ul></div> 1454</div> 1455<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 1456<td align="left"></td> 1457<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar 1458 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, 1459 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan 1460 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, 1461 Daryle Walker and Xiaogang Zhang<p> 1462 Distributed under the Boost Software License, Version 1.0. (See accompanying 1463 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 1464 </p> 1465</div></td> 1466</tr></table> 1467<hr> 1468<div class="spirit-nav"> 1469<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hypergeometric_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 1470</div> 1471</body> 1472</html> 1473