<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>FAUST compiler: colorize.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <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="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</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> <div class="contents"> <h1>colorize.h File Reference</h1><code>#include <set></code><br/> <code>#include <algorithm></code><br/> <code>#include "<a class="el" href="tlib_8hh_source.html">tlib.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for colorize.h:</div> <div class="dynsection"> </div> <p><a href="colorize_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="colorize_8h.html#a0f8ff1d12378dd049340876374a0356f">splitDependance</a> (const set< <a class="el" href="classCTree.html">Tree</a> > &exps, set< <a class="el" href="classCTree.html">Tree</a> > &post, set< <a class="el" href="classCTree.html">Tree</a> > &pre)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Analyze a set of expressions to discover its dependencies that is subexpressions common to at least two of these expressions. <a href="#a0f8ff1d12378dd049340876374a0356f"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a0f8ff1d12378dd049340876374a0356f"></a><!-- doxytag: member="colorize.h::splitDependance" ref="a0f8ff1d12378dd049340876374a0356f" args="(const set< Tree > &exps, set< Tree > &post, set< Tree > &pre)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void splitDependance </td> <td>(</td> <td class="paramtype">const set< <a class="el" href="classCTree.html">Tree</a> > & </td> <td class="paramname"> <em>exps</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">set< <a class="el" href="classCTree.html">Tree</a> > & </td> <td class="paramname"> <em>post</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">set< <a class="el" href="classCTree.html">Tree</a> > & </td> <td class="paramname"> <em>pre</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Analyze a set of expressions to discover its dependencies that is subexpressions common to at least two of these expressions. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exps</em> </td><td>set of expressions to analyze </td></tr> <tr><td valign="top"></td><td valign="top"><em>post</em> </td><td>resulting set of post expressions </td></tr> <tr><td valign="top"></td><td valign="top"><em>pre</em> </td><td>resulting set of pre expressions </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="colorize_8cpp_source.html#l00028">28</a> of file <a class="el" href="colorize_8cpp_source.html">colorize.cpp</a>.</p> <p>References <a class="el" href="colorize_8cpp_source.html#l00059">allocateColor()</a>, <a class="el" href="colorize_8cpp_source.html#l00073">colorize()</a>, <a class="el" href="colorize_8cpp_source.html#l00099">listMultiColoredExp()</a>, and <a class="el" href="colorize_8cpp_source.html#l00086">uncolorize()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00029"></a>00029 { <a name="l00030"></a>00030 set<Tree>::const_iterator e; <a name="l00031"></a>00031 <span class="keywordflow">for</span> (e= exps.begin(); e != exps.end(); e++) { <a name="l00032"></a>00032 <a class="code" href="colorize_8cpp.html#a8fceb2afc402ca2359e5de3d056de73d" title="add color information to exp and all its subtrees">colorize</a>(*e, <a class="code" href="colorize_8cpp.html#a4bd3d0035fd38bae8aa83898889bb22f" title="allocate a new unique color for exp">allocateColor</a>(*e)); <a name="l00033"></a>00033 } <a name="l00034"></a>00034 <a name="l00035"></a>00035 pre.clear(); <a name="l00036"></a>00036 <span class="keywordflow">for</span> (e = exps.begin(); e != exps.end(); e++) { <a name="l00037"></a>00037 <a class="code" href="colorize_8cpp.html#a30dd1b2444e94cd3d6231eb8f7f112b5" title="list multicolored subexpressions of exp">listMultiColoredExp</a>(*e, pre); <a name="l00038"></a>00038 } <a name="l00039"></a>00039 <a name="l00040"></a>00040 post.clear(); <a name="l00041"></a>00041 set_difference(exps.begin(), exps.end(), pre.begin(), pre.end(), inserter(post, post.begin())); <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="keywordflow">for</span> (e = exps.begin(); e != exps.end(); e++) { <a name="l00044"></a>00044 <a class="code" href="colorize_8cpp.html#a8d5048eda3154390aea0838aec62dc89" title="remove color information">uncolorize</a>(*e); <a name="l00045"></a>00045 } <a name="l00046"></a>00046 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:03 2010 for FAUST compiler by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>