Boost C++ Libraries: Ticket #3397: provide overloads for operator* for matrix/vector multiplies https://svn.boost.org/trac10/ticket/3397 <p> Since many people a familiar with using operator* we should add the corresponding overloads to uBLAS. A good reference is the syntax used by MATLAB. The final syntax should be </p> <pre class="wiki"> matrix&lt;double&gt; A; vector&lt;double&gt; x; vector&lt;double&gt; y; cout &lt;&lt; 2.0 * y &lt;&lt; endl; cout &lt;&lt; y * 2 &lt;&lt; endl; cout &lt;&lt; A * 2 &lt;&lt; endl; cout &lt;&lt; 2 * A &lt;&lt; endl; cout &lt;&lt; A * y &lt;&lt; endl; cout &lt;&lt; trans(y) * A &lt;&lt; endl; cout &lt;&lt; A * A &lt;&lt; endl; </pre><p> Similar to trans() we should provide herm() for complex matrices. </p> <p> the syntax for inner and outer products could be </p> <pre class="wiki"> vector&lt;double&gt; x,a,b; x = trans(a) * b; // inner prod x = a * trans(b); // outer prod </pre><p> the syntax for products with higher precision should be </p> <pre class="wiki"> prec(A*b); prec(trans(a) * b); </pre><p> a *= operator should also be provided </p> <pre class="wiki">b *= A; A *= B; </pre><p> which could be mapped to the correspondy axpy_prod() call. </p> <p> further tasks: </p> <ul><li>find a solution for the product of three matrices which is currently only possible by stating an explicit temporary matrix. </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3397 Trac 1.4.3 Gunter Thu, 03 Sep 2009 21:42:15 GMT type changed https://svn.boost.org/trac10/ticket/3397#comment:1 https://svn.boost.org/trac10/ticket/3397#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> Ticket Gunter Sat, 05 Sep 2009 12:51:14 GMT <link>https://svn.boost.org/trac10/ticket/3397#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3397#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56045" title="see #3397 vector_expression.hpp: added enable_if to expression scalar ...">[56045]</a>) see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3397" title="#3397: Feature Requests: provide overloads for operator* for matrix/vector multiplies (closed: duplicate)">#3397</a> </p> <p> vector_expression.hpp: added enable_if to expression scalar * vector and vector * scalar </p> <p> matrix_expression.hpp: added enable_if to expression scalar * matrix and matrix * scalar </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Tue, 06 Oct 2009 23:31:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3397#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3397#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56625" title="see #3397 * merged [56045] into release * add enable_if to operator* ...">[56625]</a>) see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3397" title="#3397: Feature Requests: provide overloads for operator* for matrix/vector multiplies (closed: duplicate)">#3397</a> </p> <ul><li>merged <a class="changeset" href="https://svn.boost.org/trac10/changeset/56045" title="see #3397 vector_expression.hpp: added enable_if to expression scalar ...">[56045]</a> into release </li><li>add enable_if to operator* for scalar*vector, vector*scalar, scalar*matrix, matrix*scalar in order to hinder unexpected instantiation. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>David Bellot</dc:creator> <pubDate>Wed, 24 Mar 2010 11:00:11 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/3397#comment:4 https://svn.boost.org/trac10/ticket/3397#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gunter</span> to <span class="trac-author">David Bellot</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I will explore eigen solution to the problem of 3 matrices </p> Ticket anonymous Fri, 15 Oct 2010 11:00:49 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3397#comment:5 https://svn.boost.org/trac10/ticket/3397#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> a new ticket 4442 with a simple implementation has been opened and a patch proposed. </p> Ticket maxim.yegorushkin@… Thu, 01 Aug 2013 12:14:09 GMT <link>https://svn.boost.org/trac10/ticket/3397#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3397#comment:6</guid> <description> <p> When is this functionality expected to merged into a boost release please? </p> </description> <category>Ticket</category> </item> </channel> </rss>