<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_974d432048ef135a7d3fc83794dbf3e9.html">binners</a> </div> </div> <div class="contents"> <h1>Bins1DBase.h</h1><a href="Bins1DBase_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: c++ -*- */</span> <a name="l00002"></a>00002 <a name="l00014"></a>00014 <span class="preprocessor">#ifndef _Bins1DBase_H_</span> <a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define _Bins1DBase_H_</span> <a name="l00016"></a>00016 <span class="preprocessor"></span> <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="BinsBase_8h.html" title="hippodraw::BinsBase class interface">BinsBase.h</a>"</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="BinnerAxis_8h.html" title="hippodraw::BinnerAxis class interface">BinnerAxis.h</a>"</span> <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="keyword">namespace </span>hippodraw { <a name="l00022"></a>00022 <a name="l00030"></a><a class="code" href="classhippodraw_1_1Bins1DBase.html">00030</a> <span class="keyword">class </span><a class="code" href="libhippo_8h.html#a480024fd54849c743866874550153711">MDL_HIPPOPLOT_API</a> <a class="code" href="classhippodraw_1_1Bins1DBase.html" title="The base class for the one-dimensional binner hierarchy.">Bins1DBase</a> : <span class="keyword">public</span> <a class="code" href="classhippodraw_1_1BinsBase.html" title="The base class for the binner hierarchy.">BinsBase</a> <a name="l00031"></a>00031 { <a name="l00032"></a>00032 <span class="keyword">private</span>: <a name="l00033"></a>00033 <a name="l00035"></a>00035 <span class="keywordtype">void</span> resize (); <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="keyword">protected</span>: <a name="l00038"></a>00038 <a name="l00040"></a><a class="code" href="classhippodraw_1_1Bins1DBase.html#a88dbae210e7f070589cf79899553b0c2">00040</a> <a class="code" href="classhippodraw_1_1BinnerAxis.html" title="The base class for the BinnerAxis hierarchy.">BinnerAxis</a> * binner_axis; <a name="l00041"></a>00041 <a name="l00043"></a>00043 <a class="code" href="classhippodraw_1_1Bins1DBase.html" title="The base class for the one-dimensional binner hierarchy.">Bins1DBase</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ); <a name="l00044"></a>00044 <a name="l00046"></a>00046 <a class="code" href="classhippodraw_1_1Bins1DBase.html" title="The base class for the one-dimensional binner hierarchy.">Bins1DBase</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Bins1DBase.html" title="The base class for the one-dimensional binner hierarchy.">Bins1DBase</a> & binner ); <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="keyword">virtual</span> <span class="keywordtype">double</span> getLow ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <span class="keyword">const</span>; <a name="l00049"></a>00049 <a name="l00051"></a>00051 <span class="keyword">virtual</span> <span class="keywordtype">void</span> resize ( <span class="keywordtype">int</span> number ) = 0; <a name="l00052"></a>00052 <a name="l00057"></a>00057 <span class="keyword">virtual</span> <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&lt;double&gt; to store the column...">NTuple</a> * prepareNTuple ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rows ) <span class="keyword">const</span>; <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="keyword">public</span>: <a name="l00060"></a>00060 <a name="l00062"></a>00062 <span class="keyword">virtual</span> ~<a class="code" href="classhippodraw_1_1Bins1DBase.html" title="The base class for the one-dimensional binner hierarchy.">Bins1DBase</a> (); <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getNumberOfAxes () <span class="keyword">const</span>; <a name="l00065"></a>00065 <a name="l00066"></a>00066 <span class="keyword">virtual</span> <span class="keywordtype">int</span> numberOfBins ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <span class="keyword">const</span>; <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> hasEqualWidths () <span class="keyword">const</span>; <a name="l00069"></a>00069 <a name="l00074"></a>00074 <span class="keywordtype">double</span> binWidth ( <span class="keywordtype">int</span> i ) <span class="keyword">const</span>; <a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinnerAxis.html" title="The base class for the BinnerAxis hierarchy.">BinnerAxis</a> * getBinnerOn ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <span class="keyword">const</span>; <a name="l00077"></a>00077 <a name="l00080"></a>00080 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setBinnerOn ( <a class="code" href="classhippodraw_1_1BinnerAxis.html" title="The base class for the BinnerAxis hierarchy.">BinnerAxis</a> *, <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ); <a name="l00081"></a>00081 <a name="l00083"></a>00083 <span class="keywordtype">double</span> getHigh() <span class="keyword">const</span>; <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setNumberOfBins ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <span class="keywordtype">int</span> num_bins ); <a name="l00086"></a>00086 <a name="l00089"></a>00089 <span class="keyword">inline</span> <span class="keywordtype">int</span> binNumber(<span class="keywordtype">double</span> x); <a name="l00090"></a>00090 <a name="l00091"></a>00091 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & setBinWidth ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l00092"></a>00092 <span class="keywordtype">double</span> value ); <a name="l00093"></a>00093 <a name="l00096"></a>00096 <span class="keywordtype">double</span> calcBinWidth ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l00097"></a>00097 <span class="keywordtype">int</span> parm, <a name="l00098"></a>00098 <span class="keywordtype">bool</span> dragging ) <span class="keyword">const</span>; <a name="l00099"></a>00099 <a name="l00101"></a>00101 <span class="keyword">virtual</span> <span class="keywordtype">double</span> calcOffset ( <span class="keyword">const</span> std::string &, <a name="l00102"></a>00102 <span class="keywordtype">int</span> parm, <a name="l00103"></a>00103 <span class="keywordtype">bool</span> dragging ) <span class="keyword">const</span>; <a name="l00104"></a>00104 <a name="l00106"></a>00106 <span class="keyword">virtual</span> <span class="keywordtype">double</span> getOffset ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <span class="keyword">const</span>; <a name="l00107"></a>00107 <a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setOffset ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <span class="keywordtype">double</span> value ); <a name="l00111"></a>00111 <a name="l00112"></a>00112 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & setRange ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis, <a name="l00113"></a>00113 <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> &, <a name="l00114"></a>00114 <span class="keywordtype">bool</span> hold_width = <span class="keyword">true</span> ); <a name="l00115"></a>00115 <a name="l00117"></a>00117 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & getRange ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ); <a name="l00118"></a>00118 <a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">double</span> scaleFactor () <span class="keyword">const</span>; <a name="l00123"></a>00123 <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">virtual</span> <span class="keywordtype">double</span> binWidth ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis ) <span class="keyword">const</span>; <a name="l00126"></a>00126 <a name="l00131"></a>00131 <span class="keyword">virtual</span> <span class="keywordtype">int</span> getNumberOfEntries ( <span class="keywordtype">int</span> i ) <span class="keyword">const</span> = 0; <a name="l00132"></a>00132 <a name="l00133"></a>00133 }; <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="keyword">inline</span> <a name="l00136"></a>00136 <span class="keywordtype">int</span> <a name="l00137"></a><a class="code" href="classhippodraw_1_1Bins1DBase.html#a3d9b21ad28ed7d68735c8a6232503f57">00137</a> <a class="code" href="classhippodraw_1_1Bins1DBase.html#a3d9b21ad28ed7d68735c8a6232503f57" title="Returns the number of the bin in which the x value is situated.">Bins1DBase::binNumber</a>(<span class="keywordtype">double</span> x) <a name="l00138"></a>00138 { <a name="l00139"></a>00139 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1Bins1DBase.html#a88dbae210e7f070589cf79899553b0c2" title="The binner axis object.">binner_axis</a>-><a class="code" href="classhippodraw_1_1BinnerAxis.html#acff56310210e66c24c8204630f659098" title="Returns the number of the bin in which the x value is situated.">axisBinNumber</a>(x); <a name="l00140"></a>00140 } <a name="l00141"></a>00141 <a name="l00142"></a>00142 <a name="l00143"></a>00143 } <span class="comment">// namespace hippodraw</span> <a name="l00144"></a>00144 <a name="l00145"></a>00145 <span class="preprocessor">#endif // _Bins1DBase_H_</span> </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>