Mercurial > hg > kwantix
view html/utils_8hpp-source.html @ 4:9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
data.
author | Jordi Guitérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Sun, 29 Jun 2008 04:06:48 -0500 |
parents | 4fa56dc7e271 |
children |
line wrap: on
line source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>include/utils.hpp Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</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> </ul> </div> <h1>include/utils.hpp</h1><a href="utils_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __UTILS_H__ </span> <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __UTILS_H__</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <span class="preprocessor">#include <string></span> <a name="l00009"></a>00009 <span class="preprocessor">#include <map></span> <a name="l00010"></a>00010 <span class="preprocessor">#include <set></span> <a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="linalg_8hpp.html" title="Wrapper linear algebra classes for the GSL.">linalg.hpp</a>"</span> <a name="l00012"></a>00012 <a name="l00017"></a>00017 <span class="keyword">namespace </span>utils{ <a name="l00019"></a>00019 std::string <a class="code" href="namespaceutils.html#935df850f81594becc164936220efa39" title="Clears whitespace from front and back of string s.">trim</a>(<span class="keyword">const</span> std::string& s); <a name="l00020"></a>00020 <a name="l00022"></a>00022 <span class="keyword">template</span><<span class="keyword">typename</span> K, <span class="keyword">typename</span> V> <a name="l00023"></a>00023 <span class="keywordtype">bool</span> <a class="code" href="namespaceutils.html#fb19b3d848cde0fda24dcbb464ccd82c" title="Does map m contain thing?">contains</a>(<span class="keyword">const</span> std::map<K,V>& m, K thing); <a name="l00025"></a>00025 <span class="keyword">template</span><<span class="keyword">typename</span> E> <a name="l00026"></a>00026 <span class="keywordtype">bool</span> <a class="code" href="namespaceutils.html#fb19b3d848cde0fda24dcbb464ccd82c" title="Does map m contain thing?">contains</a>(<span class="keyword">const</span> std::set<E>& s, E thing); <a name="l00027"></a>00027 <a name="l00029"></a>00029 <span class="keyword">template</span><<span class="keyword">typename</span> E> <a name="l00030"></a>00030 <span class="keywordtype">bool</span> <a class="code" href="namespaceutils.html#2426192e16d4950542ccb869b17dcd64" title="Does set s1 include set s2?">includes</a>(<span class="keyword">const</span> std::set<E>& s1, <span class="keyword">const</span> std::set<E>& s2); <a name="l00031"></a>00031 <a name="l00033"></a>00033 <a class="code" href="classlinalg_1_1matrix.html" title="A wrapper class for GNU Scientific Library matrices.">linalg::matrix</a> <a class="code" href="namespaceutils.html#b42e4368b19c93b1531108976bf7a94f" title="Reads matrices from filenames.">read_matrix</a>(std::string filename); <a name="l00035"></a>00035 <a class="code" href="classlinalg_1_1vector.html" title="A wrapper class for GSL vectors.">linalg::vector</a> <a class="code" href="namespaceutils.html#e8c075129702b53e5f0b0243c1f2f789" title="Reads vectors from filenames.">read_vector</a>(std::string filename); <a name="l00036"></a>00036 <a name="l00042"></a>00042 std::map<linalg::point, double> <a class="code" href="namespaceutils.html#125349ee1148844b024c04a92c4e7487" title="Reads map&lt;point,double&gt; from a matrix.">read_pd_map</a>(std::string filename); <a name="l00043"></a>00043 <a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="namespaceutils.html#595f105dae1ef7d5c49f35603258bdad" title="Outputs some information about generic exceptions.">show_exception</a>(<a class="code" href="classerror__handling_1_1error.html" title="generic error and base struct. /*GSL_FAILURE = -1,*/">error_handling::error</a> exc); <a name="l00046"></a>00046 <a name="l00047"></a>00047 } <a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sat Jun 28 00:33:26 2008 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>