html/classes/Eymiha/Histogram.html in eymiha_util-1.0.1 vs html/classes/Eymiha/Histogram.html in eymiha_util-1.0.2
- old
+ new
@@ -1,325 +1,325 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Class: Eymiha::Histogram</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
- <script type="text/javascript">
- // <![CDATA[
-
- function popupCode( url ) {
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
- }
-
- function toggleCode( id ) {
- if ( document.getElementById )
- elem = document.getElementById( id );
- else if ( document.all )
- elem = eval( "document.all." + id );
- else
- return false;
-
- elemStyle = elem.style;
-
- if ( elemStyle.display != "block" ) {
- elemStyle.display = "block"
- } else {
- elemStyle.display = "none"
- }
-
- return true;
- }
-
- // Make codeblocks hidden by default
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
-
- // ]]>
- </script>
-
-</head>
-<body>
-
-
-
- <div id="classHeader">
- <table class="header-table">
- <tr class="top-aligned-row">
- <td><strong>Class</strong></td>
- <td class="class-name-in-header">Eymiha::Histogram</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/eymiha/util/histogram_rb.html">
- lib/eymiha/util/histogram.rb
- </a>
- <br />
- </td>
- </tr>
-
- <tr class="top-aligned-row">
- <td><strong>Parent:</strong></td>
- <td>
- Hash
- </td>
- </tr>
- </table>
- </div>
- <!-- banner header -->
-
- <div id="bodyContent">
-
-
-
- <div id="contextContent">
-
- <div id="description">
- <p>
-A <a href="Histogram.html">Histogram</a> is a hash whose values are counts
-of the occurences of the keys.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000042"><</a>
- <a href="#M000041"><=</a>
- <a href="#M000043">==</a>
- <a href="#M000040">></a>
- <a href="#M000039">>=</a>
- <a href="#M000037">add</a>
- <a href="#M000036">count</a>
- <a href="#M000038">key_count</a>
- <a href="#M000035">new</a>
- </div>
- </div>
-
- </div>
-
-
- <!-- if includes -->
-
- <div id="section">
-
-
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Class methods</h3>
-
- <div id="method-M000035" class="method-detail">
- <a name="M000035"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000035.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000035.html');return false;">
- <span class="method-name">new</span><span class="method-args">(key=nil,number=1)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Creates and returns an instance. If arguments are given, they are passed to
-the <a href="Histogram.html#M000037">add</a> method to initialize the <a
-href="Histogram.html#M000035">new</a> instance.
-</p>
- </div>
- </div>
-
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000042" class="method-detail">
- <a name="M000042"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000042.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000042.html');return false;">
- <span class="method-name"><</span><span class="method-args">(count)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a <a href="Histogram.html#M000035">new</a> <a
-href="Histogram.html">Histogram</a> containing the elements with occurences
-less than the given <a href="Histogram.html#M000036">count</a>.
-</p>
- </div>
- </div>
-
- <div id="method-M000041" class="method-detail">
- <a name="M000041"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000041.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000041.html');return false;">
- <span class="method-name"><=</span><span class="method-args">(count)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a <a href="Histogram.html#M000035">new</a> <a
-href="Histogram.html">Histogram</a> containing the elements with occurences
-less than or equal to the given <a href="Histogram.html#M000036">count</a>.
-</p>
- </div>
- </div>
-
- <div id="method-M000043" class="method-detail">
- <a name="M000043"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000043.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000043.html');return false;">
- <span class="method-name">==</span><span class="method-args">(count)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-If <a href="Histogram.html#M000036">count</a> is a number, a <a
-href="Histogram.html#M000035">new</a> <a
-href="Histogram.html">Histogram</a> containing the elements with occurences
-equal to the given countis returned. If the <a
-href="Histogram.html#M000036">count</a> is a histogram, true is returned if
-the instance contains the same keys and values; false otherwise.
-</p>
- </div>
- </div>
-
- <div id="method-M000040" class="method-detail">
- <a name="M000040"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000040.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000040.html');return false;">
- <span class="method-name">></span><span class="method-args">(count)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a <a href="Histogram.html#M000035">new</a> <a
-href="Histogram.html">Histogram</a> containing the elements with occurences
-greater than the given <a href="Histogram.html#M000036">count</a>.
-</p>
- </div>
- </div>
-
- <div id="method-M000039" class="method-detail">
- <a name="M000039"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000039.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000039.html');return false;">
- <span class="method-name">>=</span><span class="method-args">(count)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns a <a href="Histogram.html#M000035">new</a> <a
-href="Histogram.html">Histogram</a> containing the elements with occurences
-greater than or equal to the given <a
-href="Histogram.html#M000036">count</a>.
-</p>
- </div>
- </div>
-
- <div id="method-M000037" class="method-detail">
- <a name="M000037"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000037.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000037.html');return false;">
- <span class="method-name">add</span><span class="method-args">(key,count=1)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Adds the key to the instance if it doesn‘t already exist, and adds
-the specified <a href="Histogram.html#M000036">count</a> to it value. If
-the key is
-</p>
-<ul>
-<li>an Array, each member of the array is added. if the member itself is an
-Array, then if that array has one member, the member is added as a key; if
-two members, the member is added as a key and a <a
-href="Histogram.html#M000036">count</a>; otherwise, a <a
-href="HistogramException.html">HistogramException</a> is thrown.
-
-</li>
-<li>another histogram, the keys and counts in the key are added to the
-instance.
-
-</li>
-</ul>
- </div>
- </div>
-
- <div id="method-M000036" class="method-detail">
- <a name="M000036"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000036.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000036.html');return false;">
- <span class="method-name">count</span><span class="method-args">(check_keys = keys)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the number of occurences of the given key. If an array of keys is
-given, the sum of the number of occurences of those keys is returned.
-</p>
- </div>
- </div>
-
- <div id="method-M000038" class="method-detail">
- <a name="M000038"></a>
-
- <div class="method-heading">
- <a href="Histogram.src/M000038.html" target="Code" class="method-signature"
- onclick="popupCode('Histogram.src/M000038.html');return false;">
- <span class="method-name">key_count</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the number of keys in the instance.
-</p>
- </div>
- </div>
-
-
- </div>
-
-
- </div>
-
-
-<div id="validator-badges">
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
-</div>
-
-</body>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Eymiha::Histogram</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Eymiha::Histogram</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/eymiha/util/histogram_rb.html">
+ lib/eymiha/util/histogram.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Hash
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+A <a href="Histogram.html">Histogram</a> is a hash whose values are counts
+of the occurences of the keys.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000035"><</a>
+ <a href="#M000034"><=</a>
+ <a href="#M000036">==</a>
+ <a href="#M000033">></a>
+ <a href="#M000032">>=</a>
+ <a href="#M000030">add</a>
+ <a href="#M000029">count</a>
+ <a href="#M000031">key_count</a>
+ <a href="#M000028">new</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000028" class="method-detail">
+ <a name="M000028"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000028.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000028.html');return false;">
+ <span class="method-name">new</span><span class="method-args">(key=nil,number=1)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Creates and returns an instance. If arguments are given, they are passed to
+the <a href="Histogram.html#M000030">add</a> method to initialize the <a
+href="Histogram.html#M000028">new</a> instance.
+</p>
+ </div>
+ </div>
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000035" class="method-detail">
+ <a name="M000035"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000035.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000035.html');return false;">
+ <span class="method-name"><</span><span class="method-args">(count)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a <a href="Histogram.html#M000028">new</a> <a
+href="Histogram.html">Histogram</a> containing the elements with occurences
+less than the given <a href="Histogram.html#M000029">count</a>.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000034" class="method-detail">
+ <a name="M000034"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000034.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000034.html');return false;">
+ <span class="method-name"><=</span><span class="method-args">(count)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a <a href="Histogram.html#M000028">new</a> <a
+href="Histogram.html">Histogram</a> containing the elements with occurences
+less than or equal to the given <a href="Histogram.html#M000029">count</a>.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000036" class="method-detail">
+ <a name="M000036"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000036.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000036.html');return false;">
+ <span class="method-name">==</span><span class="method-args">(count)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+If <a href="Histogram.html#M000029">count</a> is a number, a <a
+href="Histogram.html#M000028">new</a> <a
+href="Histogram.html">Histogram</a> containing the elements with occurences
+equal to the given countis returned. If the <a
+href="Histogram.html#M000029">count</a> is a histogram, true is returned if
+the instance contains the same keys and values; false otherwise.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000033" class="method-detail">
+ <a name="M000033"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000033.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000033.html');return false;">
+ <span class="method-name">></span><span class="method-args">(count)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a <a href="Histogram.html#M000028">new</a> <a
+href="Histogram.html">Histogram</a> containing the elements with occurences
+greater than the given <a href="Histogram.html#M000029">count</a>.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000032" class="method-detail">
+ <a name="M000032"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000032.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000032.html');return false;">
+ <span class="method-name">>=</span><span class="method-args">(count)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns a <a href="Histogram.html#M000028">new</a> <a
+href="Histogram.html">Histogram</a> containing the elements with occurences
+greater than or equal to the given <a
+href="Histogram.html#M000029">count</a>.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000030" class="method-detail">
+ <a name="M000030"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000030.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000030.html');return false;">
+ <span class="method-name">add</span><span class="method-args">(key,count=1)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Adds the key to the instance if it doesn‘t already exist, and adds
+the specified <a href="Histogram.html#M000029">count</a> to it value. If
+the key is
+</p>
+<ul>
+<li>an Array, each member of the array is added. if the member itself is an
+Array, then if that array has one member, the member is added as a key; if
+two members, the member is added as a key and a <a
+href="Histogram.html#M000029">count</a>; otherwise, a <a
+href="HistogramException.html">HistogramException</a> is thrown.
+
+</li>
+<li>another histogram, the keys and counts in the key are added to the
+instance.
+
+</li>
+</ul>
+ </div>
+ </div>
+
+ <div id="method-M000029" class="method-detail">
+ <a name="M000029"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000029.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000029.html');return false;">
+ <span class="method-name">count</span><span class="method-args">(check_keys = keys)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the number of occurences of the given key. If an array of keys is
+given, the sum of the number of occurences of those keys is returned.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000031" class="method-detail">
+ <a name="M000031"></a>
+
+ <div class="method-heading">
+ <a href="Histogram.src/M000031.html" target="Code" class="method-signature"
+ onclick="popupCode('Histogram.src/M000031.html');return false;">
+ <span class="method-name">key_count</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the number of keys in the instance.
+</p>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
</html>
\ No newline at end of file