Sophie

Sophie

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

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_def71da3bddda44674e9e2d37979faa1.html">numarray</a>
  </div>
</div>
<div class="contents">
<h1>NumArrayTuple.h</h1><a href="NumArrayTuple_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c++ -*- */</span>
<a name="l00002"></a>00002 
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef NumArrayTuple_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define NumArrayTuple_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="comment">// for have numarray etc</span>
<a name="l00018"></a>00018 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#include &quot;config.h&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#endif</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#ifdef HAVE_NUMPY</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#include &lt;numpy/noprefix.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#else</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#ifdef HAVE_NUMERIC</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Numeric/arrayobject.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#else</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include &lt;numarray/arrayobject.h&gt;</span>
<a name="l00029"></a><a class="code" href="NumArrayTuple_8h.html#a4c6d8524229a43d1feecf98da4777b6a">00029</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="num__util_8h.html#a4c6d8524229a43d1feecf98da4777b6a">intp</a>;
<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="DataSource_8h.html" title="hippodraw::DataSource class interface.">datasrcs/DataSource.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a><a class="code" href="namespaceboost.html">00035</a> <span class="keyword">namespace </span>boost {
<a name="l00036"></a><a class="code" href="namespaceboost_1_1python.html">00036</a>   <span class="keyword">namespace </span>python {
<a name="l00037"></a><a class="code" href="namespaceboost_1_1python_1_1numeric.html">00037</a>     <span class="keyword">namespace </span>numeric {
<a name="l00038"></a>00038       <span class="keyword">class </span>array;
<a name="l00039"></a>00039     }
<a name="l00040"></a>00040   }
<a name="l00041"></a>00041 }
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">namespace </span>hippodraw {
<a name="l00044"></a>00044 
<a name="l00054"></a><a class="code" href="classhippodraw_1_1NumArrayTuple.html">00054</a> <span class="keyword">class </span><a class="code" href="classhippodraw_1_1NumArrayTuple.html" title="A DataSource class implemented with a Python numarray array to store the column data...">NumArrayTuple</a> : <span class="keyword">public</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a>
<a name="l00055"></a>00055 {
<a name="l00056"></a>00056 
<a name="l00057"></a>00057  <span class="keyword">private</span>:
<a name="l00058"></a>00058 
<a name="l00061"></a><a class="code" href="classhippodraw_1_1NumArrayTuple.html#a44feb2ed7d5b4f094bc43d738a620bb0">00061</a>   std::vector &lt; boost::python::numeric::array &gt; <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a44feb2ed7d5b4f094bc43d738a620bb0" title="The numarray objects that contains the data.">m_data</a>;
<a name="l00062"></a>00062 
<a name="l00067"></a><a class="code" href="classhippodraw_1_1NumArrayTuple.html#a93acb7a0d94f9e3e9cc46c1392d89ba0">00067</a>   <span class="keyword">mutable</span> std::vector &lt; double &gt; <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a93acb7a0d94f9e3e9cc46c1392d89ba0" title="A temporary array of data from one row of each column.">m_row</a>;
<a name="l00068"></a>00068 
<a name="l00069"></a>00069  <span class="keyword">public</span>:
<a name="l00070"></a>00070 
<a name="l00073"></a>00073   <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a0d85d36dd54b0697e9085c226a75c3b7" title="The default constructor.">NumArrayTuple</a> ();
<a name="l00074"></a>00074 
<a name="l00077"></a>00077   <span class="keyword">virtual</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a318695c333e5e39d168df8d3e01b5dc2" title="The destructor.">~NumArrayTuple</a>();
<a name="l00078"></a>00078 
<a name="l00082"></a>00082   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#af8f91713f705756ba9c469bddce042d4" title="Raises exception because with this release making a copy is not supported.">copy</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> &amp; );
<a name="l00083"></a>00083 
<a name="l00087"></a>00087   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a22405609eb7094686259b6a82ad8e0cc" title="Notifies observers.">notifyObservers</a> ( ) <span class="keyword">const</span>;
<a name="l00088"></a>00088 
<a name="l00091"></a>00091   <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a2b76a8f13ad489df9fa8cc9452c9012b" title="Returns the size of the slice for the next to last dimension.">rows</a> () <span class="keyword">const</span>;
<a name="l00092"></a>00092 
<a name="l00095"></a>00095   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#ac6e61de369e994009e36f344f99c15ad" title="Returns true, if NumArrayTuple is empty, i.e.">empty</a> () <span class="keyword">const</span>;
<a name="l00096"></a>00096 
<a name="l00097"></a>00097   <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a6d02cb85b64865574b5e442cbce44df1">valueAt</a> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15" title="The column indices for 2 dimension data point tuple.">column</a> ) <span class="keyword">const</span>;
<a name="l00098"></a>00098 
<a name="l00107"></a>00107   <span class="keywordtype">int</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a3819df12544a637523c37c05b7b24f76" title="Adds a column to the end of the NumArrayTuple.">addColumn</a> ( <span class="keyword">const</span> std::string &amp; label, 
<a name="l00108"></a>00108                   boost::python::numeric::array array );
<a name="l00109"></a>00109 
<a name="l00115"></a>00115   <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a635bb26070528124f48d9d670dfb87bd" title="Replaces the column indexed by index with the array.">replaceColumn</a> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, 
<a name="l00116"></a>00116                        boost::python::numeric::array array );
<a name="l00117"></a>00117 
<a name="l00123"></a>00123   <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a635bb26070528124f48d9d670dfb87bd" title="Replaces the column indexed by index with the array.">replaceColumn</a> ( <span class="keyword">const</span> std::string &amp; label,
<a name="l00124"></a>00124                        boost::python::numeric::array array );
<a name="l00125"></a>00125 
<a name="l00127"></a>00127    boost::python::numeric::array
<a name="l00128"></a>00128    <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a576b62321c3ec3f3726c13741135178a" title="Return the reference to the desired numarray by column label.">getNumArray</a>( <span class="keyword">const</span> std::string &amp; label ) <span class="keyword">const</span>;
<a name="l00129"></a>00129 
<a name="l00131"></a>00131    boost::python::numeric::array
<a name="l00132"></a>00132    <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a576b62321c3ec3f3726c13741135178a" title="Return the reference to the desired numarray by column label.">getNumArray</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l00133"></a>00133 
<a name="l00136"></a>00136   <span class="keyword">virtual</span> <span class="keyword">const</span> std::vector &lt; double &gt; &amp; <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a6810ce28ceb1ff3d729b2c3c9e771fb7" title="Returns a const reference to slice along the axis known as a row.">getRow</a> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l00137"></a>00137 
<a name="l00144"></a>00144   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a6f267e1482fa1b59a3193a9b11cf32f9" title="Sets the shape of the data elements.">setShape</a> ( std::vector &lt; unsigned int &gt; &amp; <a class="code" href="namespacenum__util.html#a8570d9b34e8e9d714823c1b1986764f7">shape</a> );
<a name="l00145"></a>00145 
<a name="l00148"></a>00148   <span class="keyword">const</span> std::vector &lt; unsigned int &gt; &amp; <a class="code" href="classhippodraw_1_1NumArrayTuple.html#ac263a432c113e518030935750c65b801" title="Returns the shape of the data elements.">getShape</a> () <span class="keyword">const</span>;
<a name="l00149"></a>00149 
<a name="l00156"></a>00156   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a02c5e24b01c9be6cf12e4815baca5574" title="Fills the vector with the shape of a column.">fillShape</a> ( std::vector &lt; intptr_t &gt; &amp; v,
<a name="l00157"></a>00157                            <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacehippodraw_1_1DataPoint2DTuple.html#ae78e6e11a40e6dba1bae097358f97d15" title="The column indices for 2 dimension data point tuple.">column</a> ) <span class="keyword">const</span>;
<a name="l00158"></a>00158 
<a name="l00160"></a>00160   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#ac8bb3912a3ce86b15842e79d0b421204" title="Raises assertion as this method is not implemented yet.">clear</a> ();
<a name="l00161"></a>00161 
<a name="l00163"></a>00163   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1NumArrayTuple.html#a595acdd9cae86ec28dd0f894833a8c0d" title="Raises assertion as this method is not implemented yet.">reserve</a> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> count );
<a name="l00164"></a>00164 
<a name="l00166"></a>00166   <span class="keyword">virtual</span> <span class="keywordtype">double</span> 
<a name="l00167"></a>00167   <a class="code" href="classhippodraw_1_1NumArrayTuple.html#acbf962bf260a39f2b3fef70abfc21422" title="Raises assertion as this method is not implemented yet.">operator [] </a>(  std::vector &lt; unsigned int &gt; &amp; indices ) <span class="keyword">const</span>;
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 };
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 } <span class="comment">// namespace hippodraw</span>
<a name="l00172"></a>00172 
<a name="l00173"></a>00173 <span class="preprocessor">#endif // NumArrayTuple_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>