Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > eebc325dc36bd6e3b09b9b45133e42f8 > files > 1390

HippoDraw-devel-docs-1.21.1-10.fc13.i686.rpm

<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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_58b38df2e31e2ca35feeee31429c3534.html">projectors</a>
  </div>
</div>
<div class="contents">
<h1>MeshProjector.cxx</h1><a href="MeshProjector_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="comment">// Include max() and min() missing from Microsoft Visual C++.</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;msdevstudio/MSconfig.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="MeshProjector_8h.html" title="hippodraw::MeshProjector class interface">MeshProjector.h</a>&quot;</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="AxisModelBase_8h.html" title="hippodraw::AxisModelBase class interface">axes/AxisModelBase.h</a>&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="Range_8h.html" title="hippodraw::Range class interface">axes/Range.h</a>&quot;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="DataPointTuple_8h.html" title="hippodraw::DataPointTuple namespace interface">datasrcs/DataPointTuple.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="NTuple_8h.html" title="hippodraw::NTuple class interface.">datasrcs/NTuple.h</a>&quot;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;cfloat&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;climits&gt;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;cassert&gt;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">using namespace </span>hippodraw;
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="preprocessor">#ifdef ITERATOR_MEMBER_DEFECT</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="keyword">using namespace </span>std;
<a name="l00035"></a>00035 <span class="preprocessor">#else</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="keyword">using</span> std::find;
<a name="l00037"></a>00037 <span class="keyword">using</span> std::max;
<a name="l00038"></a>00038 <span class="keyword">using</span> std::min;
<a name="l00039"></a>00039 <span class="keyword">using</span> std::string;
<a name="l00040"></a>00040 <span class="keyword">using</span> std::vector;
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a2b52800797b617f4e76fd529f79bf11c">00043</a> MeshProjector::MeshProjector ( )
<a name="l00044"></a>00044   : <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> ( 5 ),
<a name="l00045"></a>00045     m_x_option ( <span class="stringliteral">&quot;X width (optional)&quot;</span> ),
<a name="l00046"></a>00046     m_y_option ( <span class="stringliteral">&quot;Y width (optional)&quot;</span> )
<a name="l00047"></a>00047 {
<a name="l00048"></a>00048   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( <span class="stringliteral">&quot;X&quot;</span> );
<a name="l00049"></a>00049   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( <span class="stringliteral">&quot;Y&quot;</span> );
<a name="l00050"></a>00050   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( <span class="stringliteral">&quot;Z&quot;</span> );
<a name="l00051"></a>00051   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( <span class="stringliteral">&quot;X width&quot;</span> );
<a name="l00052"></a>00052   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( <span class="stringliteral">&quot;Y width&quot;</span> );
<a name="l00053"></a>00053   <a class="code" href="classhippodraw_1_1NTupleProjector.html#a09cb439a7bce94f8530145a912676a85" title="The minimum number of columns that must be bound.">m_min_bindings</a> = 5;
<a name="l00054"></a>00054   <a class="code" href="classhippodraw_1_1MeshProjector.html#ab8990698c3ce06c084cdfc0a0345c316" title="Function to add the acceptable point reps.">addPointReps</a>();
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 
<a name="l00061"></a>00061 <a class="code" href="classhippodraw_1_1MeshProjector.html#a2b52800797b617f4e76fd529f79bf11c" title="This default constructor binds to the first two columns.">MeshProjector::</a>
<a name="l00062"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a92323dafaa8109c81f21e92305109e5c">00062</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#a2b52800797b617f4e76fd529f79bf11c" title="This default constructor binds to the first two columns.">MeshProjector</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1MeshProjector.html" title="A derived class of NTupleProjector that maps 3 DataSource columns to a two dimensional...">MeshProjector</a> &amp; projector )
<a name="l00063"></a>00063   : <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> ( projector ),
<a name="l00064"></a>00064     <a class="code" href="classhippodraw_1_1NTupleProjector.html" title="An NTupleProjector is a projector that projects data from an DataSource object.">NTupleProjector</a> ( projector )
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066   <a class="code" href="classhippodraw_1_1MeshProjector.html#ab8990698c3ce06c084cdfc0a0345c316" title="Function to add the acceptable point reps.">addPointReps</a>();
<a name="l00067"></a>00067 }
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 <span class="comment">// For some reason, implementing empty destructor decrease code size</span>
<a name="l00070"></a>00070 <span class="comment">// by 5 kbytes.</span>
<a name="l00071"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ae960fd51bcdc8695f34ffef62bfeb569">00071</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ae960fd51bcdc8695f34ffef62bfeb569" title="The destructor.">MeshProjector::~MeshProjector</a>()
<a name="l00072"></a>00072 {
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074 
<a name="l00075"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a1c21293cc4656448b450db7bd3eb6ecb">00075</a> <a class="code" href="classhippodraw_1_1ProjectorBase.html" title="The base class for the Projector hierarchy.">ProjectorBase</a> * <a class="code" href="classhippodraw_1_1MeshProjector.html#a1c21293cc4656448b450db7bd3eb6ecb" title="The clone function returns an object of its own kind which is a copy of this object...">MeshProjector::clone</a>()
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#a2b52800797b617f4e76fd529f79bf11c" title="This default constructor binds to the first two columns.">MeshProjector</a>( *<span class="keyword">this</span> );
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079 
<a name="l00080"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a476d8a1119e3342b231096ff604ec731">00080</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#a476d8a1119e3342b231096ff604ec731" title="Sets whether the X width options are to be enabled or not.">MeshProjector::setXErrorOption</a> ( <span class="keywordtype">bool</span> enable )
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082   <span class="keyword">const</span> <span class="keywordtype">string</span> name ( <a class="code" href="classhippodraw_1_1MeshProjector.html#a85b8ea1bc8d228c80a6ab51f2bc47bbb" title="The label for the X width binding option.">m_x_option</a> );
<a name="l00083"></a>00083   vector&lt; string &gt;:: iterator first 
<a name="l00084"></a>00084     = find ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.begin (),
<a name="l00085"></a>00085              <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.end (),
<a name="l00086"></a>00086              name );
<a name="l00087"></a>00087 
<a name="l00088"></a>00088   <span class="keywordflow">if</span> ( first != <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.end () &amp;&amp; !enable ) {
<a name="l00089"></a>00089     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.erase ( first );
<a name="l00090"></a>00090     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] = UINT_MAX;
<a name="l00091"></a>00091   }
<a name="l00092"></a>00092   <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( enable ) {
<a name="l00093"></a>00093     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( name );
<a name="l00094"></a>00094   }
<a name="l00095"></a>00095 }
<a name="l00096"></a>00096 
<a name="l00099"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a96a94e4d660d3fcfb12d9efa5804e943">00099</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#a96a94e4d660d3fcfb12d9efa5804e943" title="Sets whether the Y width options are to be enabled or not.">MeshProjector::setYErrorOption</a> ( <span class="keywordtype">bool</span> enable )
<a name="l00100"></a>00100 {
<a name="l00101"></a>00101   <span class="keyword">const</span> <span class="keywordtype">string</span> name ( <a class="code" href="classhippodraw_1_1MeshProjector.html#ac57661f23e2588493acd260fe3f9bb64" title="The label for the Y width binding option.">m_y_option</a> );
<a name="l00102"></a>00102   vector&lt; string &gt;:: iterator first 
<a name="l00103"></a>00103     = find ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.begin (),
<a name="l00104"></a>00104              <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.end (),
<a name="l00105"></a>00105              name );
<a name="l00106"></a>00106   <span class="keywordflow">if</span> ( first != <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.end () &amp;&amp; !enable ) {
<a name="l00107"></a>00107     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.erase ( first );
<a name="l00108"></a>00108     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] = UINT_MAX;
<a name="l00109"></a>00109   }
<a name="l00110"></a>00110   <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( enable ) {
<a name="l00111"></a>00111     <a class="code" href="classhippodraw_1_1NTupleProjector.html#a325580446cf6220eaecf2f5eb7b5c6dd" title="The list of binding options for the Projector.">m_binding_options</a>.push_back ( name );
<a name="l00112"></a>00112   }
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114 
<a name="l00115"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#aa4a713c496fde26f714d49eb73e7a121">00115</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#aa4a713c496fde26f714d49eb73e7a121" title="This function is called when the ntuple has been changed to a new one.">MeshProjector::changedNTuple</a>()
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> cols = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a>-&gt;<a class="code" href="classhippodraw_1_1DataSource.html#a903d6ffef3ddea0d904a5336e231b643" title="Returns the number of columns or data arrays available from this DataSource.">columns</a> () - 1;
<a name="l00118"></a>00118   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0] &gt; cols ) <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0] = cols;
<a name="l00119"></a>00119   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1] &gt; cols ) <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1] = cols;
<a name="l00120"></a>00120   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2] &gt; cols ) <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2] = cols;
<a name="l00121"></a>00121   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] &gt; cols ) <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] = cols;
<a name="l00122"></a>00122   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] &gt; cols ) <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] = cols;
<a name="l00123"></a>00123 }
<a name="l00124"></a>00124 
<a name="l00125"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ac26ff354c4e5f8ca3d9f8c55782329db">00125</a> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ac26ff354c4e5f8ca3d9f8c55782329db" title="Finds the range of the projected values.">MeshProjector::valueRange</a> ()<span class="keyword"> const</span>
<a name="l00126"></a>00126 <span class="keyword"></span>{
<a name="l00127"></a>00127   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#a2fbc3c41944070b8bac786b6c10a6ae6" title="Returns the range of the data on the specified axis.">dataRangeOn</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> );
<a name="l00128"></a>00128 }
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a>
<a name="l00131"></a>00131 <a class="code" href="classhippodraw_1_1MeshProjector.html#a2fbc3c41944070b8bac786b6c10a6ae6" title="Returns the range of the data on the specified axis.">MeshProjector::</a>
<a name="l00132"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a2fbc3c41944070b8bac786b6c10a6ae6">00132</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#a2fbc3c41944070b8bac786b6c10a6ae6" title="Returns the range of the data on the specified axis.">dataRangeOn</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis )<span class="keyword"> const</span>
<a name="l00133"></a>00133 <span class="keyword"></span>{
<a name="l00134"></a>00134   assert ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> );
<a name="l00135"></a>00135 
<a name="l00136"></a>00136   <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ) {
<a name="l00137"></a>00137     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] == UINT_MAX ) {
<a name="l00138"></a>00138       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a4303513b8e25094a04acc16d9ac35a36" title="Returns the range of data on the specified column.">dataRange</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0] );
<a name="l00139"></a>00139     } <span class="keywordflow">else</span> {
<a name="l00140"></a>00140       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a1fd4ca4bc11b654cffffb2b24bc874f5" title="Returns a range considering both data and error.">dataRangeWithError</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0], <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] );
<a name="l00141"></a>00141     }
<a name="l00142"></a>00142   }
<a name="l00143"></a>00143   <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ) {
<a name="l00144"></a>00144     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] == UINT_MAX ) {
<a name="l00145"></a>00145       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a4303513b8e25094a04acc16d9ac35a36" title="Returns the range of data on the specified column.">dataRange</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1] );
<a name="l00146"></a>00146     }
<a name="l00147"></a>00147     <span class="keywordflow">else</span> {
<a name="l00148"></a>00148       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a1fd4ca4bc11b654cffffb2b24bc874f5" title="Returns a range considering both data and error.">dataRangeWithError</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1], <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] );
<a name="l00149"></a>00149     }
<a name="l00150"></a>00150   }
<a name="l00151"></a>00151     <span class="comment">// has to be Z</span>
<a name="l00152"></a>00152   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#ac9a499baa9d96091f1672b5c81d22e97" title="Returns the Range of the projected values.">dataRangeOnValue</a> ( );
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 
<a name="l00155"></a>00155 <span class="keyword">namespace </span>dp = hippodraw::DataPoint3DTuple;
<a name="l00156"></a>00156 
<a name="l00157"></a>00157 <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a>
<a name="l00158"></a>00158 <a class="code" href="classhippodraw_1_1MeshProjector.html#ac9a499baa9d96091f1672b5c81d22e97" title="Returns the Range of the projected values.">MeshProjector::</a>
<a name="l00159"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ac9a499baa9d96091f1672b5c81d22e97">00159</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ac9a499baa9d96091f1672b5c81d22e97" title="Returns the Range of the projected values.">dataRangeOnValue</a> ()<span class="keyword"> const</span>
<a name="l00160"></a>00160 <span class="keyword"></span>{
<a name="l00161"></a>00161   <a class="code" href="classhippodraw_1_1MeshProjector.html" title="A derived class of NTupleProjector that maps 3 DataSource columns to a two dimensional...">MeshProjector</a> * mp = const_cast &lt; <a class="code" href="classhippodraw_1_1MeshProjector.html" title="A derived class of NTupleProjector that maps 3 DataSource columns to a two dimensional...">MeshProjector</a> * &gt; ( this );
<a name="l00162"></a>00162   mp -&gt; <a class="code" href="classhippodraw_1_1MeshProjector.html#accd9823e3e5563003ba43e03b860b02e" title="Informs the projector to prepare its projected values for plotting.">prepareValues</a> ();
<a name="l00163"></a>00163   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; empty () ) {
<a name="l00164"></a>00164     <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> ( 0.0, 1.0, 0.5 );
<a name="l00165"></a>00165   }
<a name="l00166"></a>00166   <span class="keyword">const</span> vector &lt; double &gt; &amp; values = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">dp::Z</a> );
<a name="l00167"></a>00167 
<a name="l00168"></a>00168   <span class="keywordflow">return</span>  <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> ( values );
<a name="l00169"></a>00169 }
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 <span class="keywordtype">double</span>
<a name="l00172"></a>00172 <a class="code" href="classhippodraw_1_1MeshProjector.html#a4cb0f7495eda86a1db2c5c4b41638de7" title="Returns the minimum positive value of the data on a specified axis.">MeshProjector::</a>
<a name="l00173"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a4cb0f7495eda86a1db2c5c4b41638de7">00173</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#a4cb0f7495eda86a1db2c5c4b41638de7" title="Returns the minimum positive value of the data on a specified axis.">getPosOn</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis )<span class="keyword"> const</span>
<a name="l00174"></a>00174 <span class="keyword"></span>{
<a name="l00175"></a>00175   assert ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> );
<a name="l00176"></a>00176 
<a name="l00177"></a>00177   <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> ) {
<a name="l00178"></a>00178     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] == UINT_MAX ) {     <span class="comment">// Was m_columns[2], should be a bug</span>
<a name="l00179"></a>00179       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a2a913915128951416e154682039d2745" title="Returns the minimum positive value on the specified column.">getPos</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0] );
<a name="l00180"></a>00180     } <span class="keywordflow">else</span> {
<a name="l00181"></a>00181       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a5a13707bf835a2f8e37482988977a80d" title="Returns the minimum positive values considering both data and error.">getPosWithError</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0], <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3] );
<a name="l00182"></a>00182     }
<a name="l00183"></a>00183   }
<a name="l00184"></a>00184   <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a> ) {
<a name="l00185"></a>00185     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] == UINT_MAX ) {     <span class="comment">// Was m_coloumns[3], should be a bug</span>
<a name="l00186"></a>00186       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a2a913915128951416e154682039d2745" title="Returns the minimum positive value on the specified column.">getPos</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1] );
<a name="l00187"></a>00187     }
<a name="l00188"></a>00188     <span class="keywordflow">else</span> {
<a name="l00189"></a>00189       <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a5a13707bf835a2f8e37482988977a80d" title="Returns the minimum positive values considering both data and error.">getPosWithError</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1], <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4] );
<a name="l00190"></a>00190     }
<a name="l00191"></a>00191   }
<a name="l00192"></a>00192   <span class="comment">// has to be Z</span>
<a name="l00193"></a>00193   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1NTupleProjector.html#a2a913915128951416e154682039d2745" title="Returns the minimum positive value on the specified column.">getPos</a> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2] );
<a name="l00194"></a>00194 }
<a name="l00195"></a>00195 
<a name="l00196"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ab8990698c3ce06c084cdfc0a0345c316">00196</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#ab8990698c3ce06c084cdfc0a0345c316" title="Function to add the acceptable point reps.">MeshProjector::addPointReps</a>()
<a name="l00197"></a>00197 {
<a name="l00198"></a>00198   <a class="code" href="classhippodraw_1_1ProjectorBase.html#a41b31f85b35a1b9f559bbfc3f6c14f97" title="Vector of acceptable PointReps.">m_pointreps</a>.push_back ( <span class="stringliteral">&quot;ColorBox&quot;</span> );
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> *
<a name="l00202"></a>00202 <a class="code" href="classhippodraw_1_1MeshProjector.html#ae87950e837c6c9da2d59e58ff991384f" title="Creates an NTuple representation of the projected values.">MeshProjector::</a>
<a name="l00203"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ae87950e837c6c9da2d59e58ff991384f">00203</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ae87950e837c6c9da2d59e58ff991384f" title="Creates an NTuple representation of the projected values.">createNTuple</a> ()<span class="keyword"> const</span>
<a name="l00204"></a>00204 <span class="keyword"></span>{
<a name="l00205"></a>00205 
<a name="l00206"></a>00206   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0];
<a name="l00207"></a>00207   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1];
<a name="l00208"></a>00208   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> z_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2];        <span class="comment">// Was 3, should be a bug</span>
<a name="l00209"></a>00209 
<a name="l00210"></a>00210   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x_err = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3];
<a name="l00211"></a>00211   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y_err = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4];
<a name="l00212"></a>00212 
<a name="l00213"></a>00213   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> columns = <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a4aa71180778b711338785695df5d7c52" title="number of columns">dp::SIZE</a>;
<a name="l00214"></a>00214   <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&amp;lt;double&amp;gt; to store the column...">NTuple</a> * ntuple = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1NTuple.html" title="A DataSource class implemented with std::vector&amp;lt;double&amp;gt; to store the column...">NTuple</a> ( columns );
<a name="l00215"></a>00215 
<a name="l00216"></a>00216   vector &lt; string &gt; labels;
<a name="l00217"></a>00217   labels.push_back ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabelAt ( x_col ) );
<a name="l00218"></a>00218   labels.push_back ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabelAt ( y_col ) );
<a name="l00219"></a>00219   labels.push_back ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabelAt ( z_col ) );
<a name="l00220"></a>00220 
<a name="l00221"></a>00221   <span class="keywordflow">if</span> ( x_err &lt; UINT_MAX ) {
<a name="l00222"></a>00222     labels.push_back ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabelAt ( x_err ) );
<a name="l00223"></a>00223   } <span class="keywordflow">else</span> {
<a name="l00224"></a>00224     labels.push_back ( <a class="code" href="namespacehippodraw_1_1DataPoint3DTuple.html#a089e035d3ca183e27f90e6f14bf19846" title="X width label.">dp::XWIDTH</a> );
<a name="l00225"></a>00225   }
<a name="l00226"></a>00226 
<a name="l00227"></a>00227   <span class="keywordflow">if</span> ( y_err &lt; UINT_MAX ) {
<a name="l00228"></a>00228     labels.push_back ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabelAt ( y_err ) );
<a name="l00229"></a>00229   } <span class="keywordflow">else</span> {
<a name="l00230"></a>00230     labels.push_back ( <a class="code" href="namespacehippodraw_1_1DataPoint3DTuple.html#a0fcfe3fc08d3c638dfe20bb1d92e6990" title="Y width label.">dp::YWIDTH</a> );
<a name="l00231"></a>00231   }
<a name="l00232"></a>00232   labels.push_back ( <span class="stringliteral">&quot; z error&quot;</span> ); <span class="comment">// for z error</span>
<a name="l00233"></a>00233 
<a name="l00234"></a>00234   ntuple-&gt;<a class="code" href="classhippodraw_1_1NTuple.html#a4d4664fa50e3299863ecba81e224aaa6" title="Assigns the label to each column from the vector of strings.">setLabels</a> ( labels );
<a name="l00235"></a>00235 
<a name="l00236"></a>00236   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; rows ();
<a name="l00237"></a>00237   ntuple -&gt; reserve ( size );
<a name="l00238"></a>00238 
<a name="l00239"></a>00239   <a class="code" href="classhippodraw_1_1MeshProjector.html#ab230897ad265a7dfe15e2d5e263bbd65" title="Fills the DataSource the projected values.">fillProjectedValues</a> ( ntuple );
<a name="l00240"></a>00240 
<a name="l00241"></a>00241   <span class="keywordflow">return</span> ntuple;
<a name="l00242"></a>00242 }
<a name="l00243"></a>00243 
<a name="l00251"></a>00251 <span class="keywordtype">void</span>
<a name="l00252"></a>00252 <a class="code" href="classhippodraw_1_1MeshProjector.html#ab230897ad265a7dfe15e2d5e263bbd65" title="Fills the DataSource the projected values.">MeshProjector::</a>
<a name="l00253"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ab230897ad265a7dfe15e2d5e263bbd65">00253</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ab230897ad265a7dfe15e2d5e263bbd65" title="Fills the DataSource the projected values.">fillProjectedValues</a> ( <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ntuple, <span class="keywordtype">bool</span> in_range )<span class="keyword"> const</span>
<a name="l00254"></a>00254 <span class="keyword"></span>{
<a name="l00255"></a>00255   ntuple -&gt; clear ();
<a name="l00256"></a>00256 
<a name="l00257"></a>00257   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[0];
<a name="l00258"></a>00258   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[1];
<a name="l00259"></a>00259   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> z_col = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2];
<a name="l00260"></a>00260 
<a name="l00261"></a>00261   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x_err = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[3];
<a name="l00262"></a>00262   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y_err = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[4];
<a name="l00263"></a>00263 
<a name="l00264"></a>00264   <span class="keyword">const</span> vector &lt; string &gt; &amp; labels = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; getLabels ();
<a name="l00265"></a>00265   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = labels.size();
<a name="l00266"></a>00266   <span class="keywordflow">if</span> ( size &gt; 3 ) {
<a name="l00267"></a>00267     <span class="keywordflow">if</span> ( x_err == UINT_MAX &amp;&amp;
<a name="l00268"></a>00268          labels [ <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15ac577aa01d3f00f9cfae6e981756f5402" title="error on X or half bin width">dp::XERR</a> ] == <a class="code" href="namespacehippodraw_1_1DataPoint3DTuple.html#a089e035d3ca183e27f90e6f14bf19846" title="X width label.">dp::XWIDTH</a> ) x_err = <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15ac577aa01d3f00f9cfae6e981756f5402" title="error on X or half bin width">dp::XERR</a>;
<a name="l00269"></a>00269     <span class="keywordflow">if</span> ( size &gt; 3 ) {
<a name="l00270"></a>00270       <span class="keywordflow">if</span> ( y_err == UINT_MAX &amp;&amp;
<a name="l00271"></a>00271            labels [ <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a877f1ecdc13e795de8b440216711b10d" title="error on Y">dp::YERR</a> ] == <a class="code" href="namespacehippodraw_1_1DataPoint3DTuple.html#a0fcfe3fc08d3c638dfe20bb1d92e6990" title="Y width label.">dp::YWIDTH</a> ) y_err = <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a877f1ecdc13e795de8b440216711b10d" title="error on Y">dp::YERR</a>;
<a name="l00272"></a>00272     }
<a name="l00273"></a>00273   }
<a name="l00274"></a>00274   size = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; rows ();
<a name="l00275"></a>00275   vector &lt; double &gt; row ( <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a4aa71180778b711338785695df5d7c52" title="number of columns">dp::SIZE</a> );
<a name="l00276"></a>00276   <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; size; i++ ) {
<a name="l00277"></a>00277     <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1NTupleProjector.html#a970763825cc9f3f05a6ac3ce5352d554" title="For row i of the column in the DataSource, returns true if all the cuts accept the...">acceptRow</a> ( i, <a class="code" href="classhippodraw_1_1NTupleProjector.html#a1c2feed36aaa9baed5108683a08333a9" title="A list of cuts that filter the projection.">m_cut_list</a> ) == <span class="keyword">false</span> ||
<a name="l00278"></a>00278          ( in_range == <span class="keyword">true</span> &amp;&amp; <a class="code" href="classhippodraw_1_1MeshProjector.html#ac494c25dcbe8066639d9e87d1bd1d5ad" title="Returns true if value at row is within range on all axis.">inRange</a> ( i ) == <span class="keyword">false</span> ) ) <span class="keywordflow">continue</span>;
<a name="l00279"></a>00279 
<a name="l00280"></a>00280     row[<a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">dp::X</a>] = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( i, x_col );
<a name="l00281"></a>00281     row[<a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">dp::Y</a>] = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( i, y_col );
<a name="l00282"></a>00282     row[<a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">dp::Z</a>] = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( i, z_col );
<a name="l00283"></a>00283 
<a name="l00284"></a>00284 
<a name="l00285"></a>00285     <span class="keywordtype">double</span> xe 
<a name="l00286"></a>00286       = x_err &lt; UINT_MAX ? <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( i, x_err ) : 0.0;
<a name="l00287"></a>00287     <span class="keywordtype">double</span> ye 
<a name="l00288"></a>00288       = y_err &lt; UINT_MAX ? <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt( i, y_err ) : 0.0;
<a name="l00289"></a>00289 
<a name="l00290"></a>00290     row[<a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15ac577aa01d3f00f9cfae6e981756f5402" title="error on X or half bin width">dp::XERR</a>] = xe;
<a name="l00291"></a>00291     row[<a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a877f1ecdc13e795de8b440216711b10d" title="error on Y">dp::YERR</a>] = ye;
<a name="l00292"></a>00292 
<a name="l00293"></a>00293     ntuple -&gt; addRow ( row );
<a name="l00294"></a>00294   }
<a name="l00295"></a>00295 }
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 <span class="keywordtype">void</span>
<a name="l00298"></a>00298 <a class="code" href="classhippodraw_1_1MeshProjector.html#accd9823e3e5563003ba43e03b860b02e" title="Informs the projector to prepare its projected values for plotting.">MeshProjector::</a>
<a name="l00299"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#accd9823e3e5563003ba43e03b860b02e">00299</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#accd9823e3e5563003ba43e03b860b02e" title="Informs the projector to prepare its projected values for plotting.">prepareValues</a> ()
<a name="l00300"></a>00300 {
<a name="l00301"></a>00301   <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> == 0 ) {
<a name="l00302"></a>00302     <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> = <a class="code" href="classhippodraw_1_1MeshProjector.html#ae87950e837c6c9da2d59e58ff991384f" title="Creates an NTuple representation of the projected values.">createNTuple</a> ();
<a name="l00303"></a>00303   }
<a name="l00304"></a>00304   <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="classhippodraw_1_1ProjectorBase.html#ad66f409af3c387e166ff7ee95169b7b6" title="Returns true if the projector has been marked dirty.">isDirty</a> () ) {
<a name="l00305"></a>00305     <a class="code" href="classhippodraw_1_1MeshProjector.html#ab230897ad265a7dfe15e2d5e263bbd65" title="Fills the DataSource the projected values.">fillProjectedValues</a> ( <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a>, <span class="keyword">true</span> );
<a name="l00306"></a>00306   }
<a name="l00307"></a>00307 
<a name="l00308"></a>00308   <a class="code" href="classhippodraw_1_1ProjectorBase.html#a4d656a5b47b5582bfdd5aa98a11f5aff" title="Sets the dirty flag to value.">setDirty</a> ( <span class="keyword">false</span> );
<a name="l00309"></a>00309 }
<a name="l00310"></a>00310 
<a name="l00311"></a>00311 <span class="keywordtype">bool</span>
<a name="l00312"></a>00312 <a class="code" href="classhippodraw_1_1MeshProjector.html#aa3fd96caf81d77a4e2faea7798d4dc3a" title="Returns true if value at row is within range.">MeshProjector::</a>
<a name="l00313"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#aa3fd96caf81d77a4e2faea7798d4dc3a">00313</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#aa3fd96caf81d77a4e2faea7798d4dc3a" title="Returns true if value at row is within range.">inRangeWithZ</a> ( <span class="keywordtype">int</span> row, <span class="keywordtype">bool</span> with_z )<span class="keyword"> const</span>
<a name="l00314"></a>00314 <span class="keyword"></span>{
<a name="l00315"></a>00315   <span class="keywordtype">bool</span> accept = <span class="keyword">true</span>;
<a name="l00316"></a>00316 
<a name="l00317"></a>00317   <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; 2; i++ ) {
<a name="l00318"></a>00318     <a class="code" href="classhippodraw_1_1AxisModelBase.html" title="The AxisModelBase class maintains the Range and scaling of an axis.">AxisModelBase</a> * model = i == 0 ? <a class="code" href="classhippodraw_1_1ProjectorBase.html#abfbe2359165f154f6e4f532fdd41de80" title="The AxisModel along the X axis.">m_x_axis</a> : <a class="code" href="classhippodraw_1_1ProjectorBase.html#acf88649cd06c6947e10eeb2adaaa0fe2" title="The AxisModel along the Y axis.">m_y_axis</a>;
<a name="l00319"></a>00319     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> &amp; range = model -&gt; <a class="code" href="classhippodraw_1_1ProjectorBase.html#a07a7a95796bd8c890084cad57f48e5de" title="Returns the Range along the specified axis.">getRange</a> ( <span class="keyword">false</span> );
<a name="l00320"></a>00320     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vcolumn = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[i];
<a name="l00321"></a>00321     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> wcolumn = <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[i+3];
<a name="l00322"></a>00322     <span class="keywordtype">double</span> value = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( row, vcolumn );
<a name="l00323"></a>00323     <span class="keywordtype">double</span> width = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( row, wcolumn );
<a name="l00324"></a>00324     <span class="keywordtype">bool</span> in = range.<a class="code" href="classhippodraw_1_1Range.html#acd177035de6a486f16f65dd95e8e6c46" title="Returns true if the argument value is inside the range.">includes</a> ( value + width ) ||
<a name="l00325"></a>00325       range.<a class="code" href="classhippodraw_1_1Range.html#acd177035de6a486f16f65dd95e8e6c46" title="Returns true if the argument value is inside the range.">includes</a> ( value - width );
<a name="l00326"></a>00326     accept &amp;= in;
<a name="l00327"></a>00327   }
<a name="l00328"></a>00328   <span class="keywordflow">if</span> ( with_z ) {
<a name="l00329"></a>00329     <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> &amp; range = <a class="code" href="classhippodraw_1_1ProjectorBase.html#a68ad35a70cea709786ac76ee2eca4ca2" title="The AxisModel along the Z axis.">m_z_axis</a> -&gt; <a class="code" href="classhippodraw_1_1ProjectorBase.html#a07a7a95796bd8c890084cad57f48e5de" title="Returns the Range along the specified axis.">getRange</a> ( <span class="keyword">false</span> );
<a name="l00330"></a>00330     <span class="keywordtype">double</span> value = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( row, <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2] );
<a name="l00331"></a>00331     <span class="keywordtype">bool</span> in = range.<a class="code" href="classhippodraw_1_1Range.html#acd177035de6a486f16f65dd95e8e6c46" title="Returns true if the argument value is inside the range.">includes</a> ( value );
<a name="l00332"></a>00332     accept &amp;= in;
<a name="l00333"></a>00333   }
<a name="l00334"></a>00334 
<a name="l00335"></a>00335   <span class="keywordflow">return</span> accept;
<a name="l00336"></a>00336 }
<a name="l00337"></a>00337 
<a name="l00338"></a>00338 <span class="keywordtype">bool</span>
<a name="l00339"></a>00339 <a class="code" href="classhippodraw_1_1MeshProjector.html#ac494c25dcbe8066639d9e87d1bd1d5ad" title="Returns true if value at row is within range on all axis.">MeshProjector::</a>
<a name="l00340"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#ac494c25dcbe8066639d9e87d1bd1d5ad">00340</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#ac494c25dcbe8066639d9e87d1bd1d5ad" title="Returns true if value at row is within range on all axis.">inRange</a> ( <span class="keywordtype">int</span> row )<span class="keyword"> const</span>
<a name="l00341"></a>00341 <span class="keyword"></span>{
<a name="l00342"></a>00342   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#aa3fd96caf81d77a4e2faea7798d4dc3a" title="Returns true if value at row is within range.">inRangeWithZ</a> ( row, <span class="keyword">true</span> );
<a name="l00343"></a>00343 }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345 <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a>
<a name="l00346"></a>00346 <a class="code" href="classhippodraw_1_1MeshProjector.html#aa30a1de86279d1f98ba3829f6e648bbe" title="Returns the preferred Range on the given axis.">MeshProjector::</a>
<a name="l00347"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#aa30a1de86279d1f98ba3829f6e648bbe">00347</a> <a class="code" href="classhippodraw_1_1MeshProjector.html#aa30a1de86279d1f98ba3829f6e648bbe" title="Returns the preferred Range on the given axis.">preferredRange</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">Axes::Type</a> axis )<span class="keyword"> const</span>
<a name="l00348"></a>00348 <span class="keyword"></span>{
<a name="l00349"></a>00349   <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> range;
<a name="l00350"></a>00350   <span class="keywordtype">double</span> low = DBL_MAX;
<a name="l00351"></a>00351   <span class="keywordtype">double</span> pos = DBL_MAX;
<a name="l00352"></a>00352   <span class="keywordtype">double</span> high = -DBL_MIN;
<a name="l00353"></a>00353   <span class="keywordflow">if</span> ( axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">Axes::Z</a> ) {
<a name="l00354"></a>00354     std::size_t rows = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; rows ();
<a name="l00355"></a>00355     <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row = 0; row &lt; rows; row++ ) {
<a name="l00356"></a>00356       <span class="keywordtype">bool</span> accept = <a class="code" href="classhippodraw_1_1MeshProjector.html#aa3fd96caf81d77a4e2faea7798d4dc3a" title="Returns true if value at row is within range.">inRangeWithZ</a> ( row, <span class="keyword">false</span> );
<a name="l00357"></a>00357       <span class="keywordflow">if</span> ( accept ) {
<a name="l00358"></a>00358         <span class="keywordtype">double</span> value = <a class="code" href="classhippodraw_1_1NTupleProjector.html#aa4ce14472599ca738e3caba3e166be12" title="The pointer to the data source being projected.">m_ntuple</a> -&gt; valueAt ( row, <a class="code" href="classhippodraw_1_1NTupleProjector.html#a0b4e25802dd74e1f7c8d41f85a9bda5a" title="A vector containing indexes to the columns of the DataSource.">m_columns</a>[2] );
<a name="l00359"></a>00359         low = std::min ( low, value );
<a name="l00360"></a>00360         <span class="keywordflow">if</span> ( value &gt; 0 ) {
<a name="l00361"></a>00361           pos = std::min ( pos, value );
<a name="l00362"></a>00362         }
<a name="l00363"></a>00363         high = std::max ( high, value );
<a name="l00364"></a>00364       }
<a name="l00365"></a>00365     }
<a name="l00366"></a>00366     range.<a class="code" href="classhippodraw_1_1Range.html#addffd7d4904f8f6261dae4e2cb51b734" title="Changes the current Range.">setRange</a> ( low, high, pos );
<a name="l00367"></a>00367   }
<a name="l00368"></a>00368   <span class="keywordflow">else</span> {
<a name="l00369"></a>00369     range = <a class="code" href="classhippodraw_1_1MeshProjector.html#aa30a1de86279d1f98ba3829f6e648bbe" title="Returns the preferred Range on the given axis.">ProjectorBase::preferredRange</a> ( axis );
<a name="l00370"></a>00370   }
<a name="l00371"></a>00371 
<a name="l00372"></a>00372   <span class="keywordflow">return</span> range;
<a name="l00373"></a>00373 }
<a name="l00374"></a>00374 
<a name="l00375"></a>00375 
<a name="l00376"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a0c903dd960a2a534c28bb5a06bb89bda">00376</a> <span class="keyword">const</span> <span class="keywordtype">string</span> &amp; <a class="code" href="classhippodraw_1_1MeshProjector.html#a0c903dd960a2a534c28bb5a06bb89bda" title="Returns the label (title) of the z axis.">MeshProjector::getZLabel</a> ()<span class="keyword"> const</span>
<a name="l00377"></a>00377 <span class="keyword"></span>{
<a name="l00378"></a>00378   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a>-&gt;<a class="code" href="classhippodraw_1_1DataSource.html#a6b278c3842e10222f95bf0adf3973285" title="Returns the label for the column at index index.">getLabelAt</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">dp::Z</a> );
<a name="l00379"></a>00379 }
<a name="l00380"></a>00380 
<a name="l00381"></a>00381 
<a name="l00386"></a><a class="code" href="classhippodraw_1_1MeshProjector.html#a6d8a76cf5463d7850ba13bec75873deb">00386</a> <span class="keywordtype">double</span> <a class="code" href="classhippodraw_1_1MeshProjector.html#a6d8a76cf5463d7850ba13bec75873deb" title="Get the z value at the specified point (x,y).">MeshProjector::getZValue</a> ( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y )<span class="keyword"> const</span>
<a name="l00387"></a>00387 <span class="keyword"></span>{
<a name="l00388"></a>00388   
<a name="l00389"></a>00389   <span class="keywordtype">double</span> retval = 0;
<a name="l00390"></a>00390 
<a name="l00391"></a>00391   <span class="keyword">const</span> vector &lt; double &gt; &amp; xs = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">dp::X</a> );
<a name="l00392"></a>00392   <span class="keyword">const</span> vector &lt; double &gt; &amp; ys = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">dp::Y</a> );
<a name="l00393"></a>00393   <span class="keyword">const</span> vector &lt; double &gt; &amp; zs = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7aa70478ce277ffc322f8e1e3418e07355" title="Z axis.">dp::Z</a> );
<a name="l00394"></a>00394   <span class="keyword">const</span> vector &lt; double &gt; &amp; xerr = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15ac577aa01d3f00f9cfae6e981756f5402" title="error on X or half bin width">dp::XERR</a> );
<a name="l00395"></a>00395   <span class="keyword">const</span> vector &lt; double &gt; &amp; yerr = <a class="code" href="classhippodraw_1_1ProjectorBase.html#ae66fb23027bb1a726283b8018acb645d" title="The NTuple representing the result of the projection.">m_proj_values</a> -&gt; getColumn ( <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15a877f1ecdc13e795de8b440216711b10d" title="error on Y">dp::YERR</a> );
<a name="l00396"></a>00396 
<a name="l00397"></a>00397   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacenum__util.html#a137f48a49d12a7dae8ba7c86db2a0c01">size</a> = xs.size();
<a name="l00398"></a>00398   <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; size; i++ ) {
<a name="l00399"></a>00399     <span class="keywordflow">if</span> ( x&gt;xs[i]-xerr[i] &amp;&amp; x&lt;xs[i]+xerr[i] &amp;&amp; 
<a name="l00400"></a>00400          y&gt;ys[i]-yerr[i] &amp;&amp; y&lt;ys[i]+yerr[i] ) {
<a name="l00401"></a>00401       retval = zs[i];
<a name="l00402"></a>00402 
<a name="l00403"></a>00403       <span class="comment">// Assume (x,y) can not be in another box</span>
<a name="l00404"></a>00404       <span class="keywordflow">break</span>;
<a name="l00405"></a>00405     }
<a name="l00406"></a>00406   }
<a name="l00407"></a>00407 
<a name="l00408"></a>00408   <span class="keywordflow">return</span> retval;
<a name="l00409"></a>00409   
<a name="l00410"></a>00410   
<a name="l00411"></a>00411   <span class="comment">/* TO REMOVE: Old algorithm, search for the nestest data point.</span>
<a name="l00412"></a>00412 <span class="comment">     </span>
<a name="l00413"></a>00413 <span class="comment">  const Range &amp; xr = m_x_axis-&gt;getRange ( true );</span>
<a name="l00414"></a>00414 <span class="comment">  const Range &amp; yr = m_y_axis-&gt;getRange ( true );</span>
<a name="l00415"></a>00415 <span class="comment">  </span>
<a name="l00416"></a>00416 <span class="comment">  double xe = 0.1 * xr.length();</span>
<a name="l00417"></a>00417 <span class="comment">  double ye = 0.1 * yr.length();</span>
<a name="l00418"></a>00418 <span class="comment">  double distanceSquare = xe*xe+ye*ye;</span>
<a name="l00419"></a>00419 <span class="comment">  </span>
<a name="l00420"></a>00420 <span class="comment">  if ( (x-xs[i])*(x-xs[i])+(y-ys[i])*(y-ys[i]) &lt; distanceSquare)  {</span>
<a name="l00421"></a>00421 <span class="comment">  // Update the nearest point info.</span>
<a name="l00422"></a>00422 <span class="comment">  distanceSquare = (x-xs[i])*(x-xs[i])+(y-ys[i])*(y-ys[i]); </span>
<a name="l00423"></a>00423 <span class="comment">  retval = zs[i]; </span>
<a name="l00424"></a>00424 <span class="comment">  }</span>
<a name="l00425"></a>00425 <span class="comment">  */</span>
<a name="l00426"></a>00426 }
</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>