doc/rdoc/classes/RFuzz/Sampler.src/M000074.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/Sampler.src/M000074.html in rfuzz-0.9

- old
+ new

@@ -3,16 +3,24 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>dump (RFuzz::Sampler)</title> + <title>sample (RFuzz::Sampler)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre> <span class="ruby-comment cmt"># File lib/rfuzz/stats.rb, line 48</span> -48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">msg</span> = <span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">out</span>=<span class="ruby-constant">STDERR</span>) -49: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{msg}: #{self.to_s}&quot;</span> -50: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/stats.rb, line 35</span> +35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sample</span>(<span class="ruby-identifier">s</span>) +36: <span class="ruby-ivar">@sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">s</span> +37: <span class="ruby-ivar">@sumsq</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">s</span> +38: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@n</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> +39: <span class="ruby-ivar">@min</span> = <span class="ruby-ivar">@max</span> = <span class="ruby-identifier">s</span> +40: <span class="ruby-keyword kw">else</span> +41: <span class="ruby-ivar">@min</span> = <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@min</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">s</span> +42: <span class="ruby-ivar">@max</span> = <span class="ruby-identifier">s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@max</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">s</span> +43: <span class="ruby-keyword kw">end</span> +44: <span class="ruby-ivar">@n</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> +45: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file