Boost C++ Libraries: Ticket #4917: uBLAS element-wise power function https://svn.boost.org/trac10/ticket/4917 <p> I would like to introduce element-wise power function. There are four functions in the patch: </p> <ul><li><code>pow( vector_expression, scalar )</code> </li><li><code>pow( matrix_expression, scalar )</code> </li><li><code>element_pow( vector_expression, vector_expression )</code> </li><li><code>element_pow( matrix_expression, matrix_expression )</code> </li></ul><h2 class="section" id="Synopsis">Synopsis</h2> <p> These functions behave naturally. Let <code>v</code> is a vector, <code>m</code> is a matrix, <code>p</code> is a scalar then <code>pow( v, p )</code> and <code>pow( m, p )</code> just raise each element to the power <code>p</code>. <code>element_pow( v1, v2)</code> is <code>v1[i] ^ v2[i]</code>. <code>element_pow( m1, m2)</code> works similarly. </p> <h2 class="section" id="Rationalize">Rationalize</h2> <p> <a class="ext-link" href="http://ublas.sourceforge.net"><span class="icon">​</span>http://ublas.sourceforge.net</a> mentions "...elements wise basic functions (sin,cos,log,exp,abs,max,min,etc...)" </p> <h2 class="section" id="Patch">Patch</h2> <p> The patch contains implementation and also simple test routines. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4917 Trac 1.4.3 matwey.kornilov@… Wed, 01 Dec 2010 17:27:46 GMT attachment set https://svn.boost.org/trac10/ticket/4917 https://svn.boost.org/trac10/ticket/4917 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ublas-pow</span> </li> </ul> Ticket anonymous Fri, 28 Oct 2011 06:14:50 GMT <link>https://svn.boost.org/trac10/ticket/4917#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4917#comment:1</guid> <description> <p> good idea </p> </description> <category>Ticket</category> </item> </channel> </rss>