<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14208</id>
	<title>Nabble - Boost - uBLAS</title>
	<updated>2009-11-27T11:36:46Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Boost---uBLAS-f14208.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Boost---uBLAS-f14208.html" />
	<subtitle type="html">ublas mailing list</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26546943</id>
	<title>Re: [bindings] New traits system</title>
	<published>2009-11-27T11:36:46Z</published>
	<updated>2009-11-27T11:36:46Z</updated>
	<author>
		<name>Hongyu Miao</name>
	</author>
	<content type="html">Wonderfull!!! I really like all the differences listed since the previous implementation triggered so many compiling isssues for cross-platform applications. 
&lt;br&gt;&lt;br&gt;------------------				 
&lt;br&gt;Hongyu Miao
&lt;br&gt;2009-11-27
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------
&lt;br&gt;From：Rutger ter Borg
&lt;br&gt;Date：2009-11-27 04:12:16
&lt;br&gt;To：ublas
&lt;br&gt;CC：
&lt;br&gt;Subject：[ublas] [bindings] New traits system
&lt;br&gt;&lt;br&gt;&lt;br&gt;Dear all,
&lt;br&gt;&lt;br&gt;Herewith some news surrounding the numeric_bindings. I've rewritten the 
&lt;br&gt;traits part from the ground up, with simplicity, flexibility and efficiency 
&lt;br&gt;in mind.
&lt;br&gt;&lt;br&gt;Most notable differences:
&lt;br&gt;&lt;br&gt;&amp;nbsp;* Full MPL-compatible support for static matrices and vectors, for all the 
&lt;br&gt;compile-time-junkies out there.
&lt;br&gt;&amp;nbsp;* No more separate matrix and vector trait classes, all through one adaptor
&lt;br&gt;&amp;nbsp;* Built-in automatic reinterpretations (matrix-&amp;gt;vector, vector-&amp;gt;matrix, 
&lt;br&gt;scalar-&amp;gt;matrix (!), etc.) for all objects
&lt;br&gt;&amp;nbsp;* Proxies and views through meta-adaptors, e.g., row(), column(), trans(), 
&lt;br&gt;upper(), lower()
&lt;br&gt;&amp;nbsp;* Compile-time selected iterators (so far, linear data structures only, 
&lt;br&gt;triangular and yale sparse to come)
&lt;br&gt;&amp;nbsp;* IO support; pretty printing (will give nice output for all bindable 
&lt;br&gt;objects)
&lt;br&gt;&amp;nbsp;* Easier directory structure (std/vector.hpp, ublas/vector.hpp, etc.). 
&lt;br&gt;Directory name is the most specific namespace-name of the object, filename 
&lt;br&gt;is the lower-cased name of the object.
&lt;br&gt;&amp;nbsp;* Support for C arrays, standard vectors, uBLAS, TNT, eigen2, more to be 
&lt;br&gt;added such as glas and mtl4
&lt;br&gt;&lt;br&gt;Some examples of what's possible:
&lt;br&gt;&lt;br&gt;double a[5][10];
&lt;br&gt;std::cout &amp;lt;&amp;lt; column( a, 0 ) &amp;lt;&amp;lt; std::endl;
&lt;br&gt;std::sort( begin( row( a, 2 ) ), end( row( a, 2 ) ) );
&lt;br&gt;std::cout &amp;lt;&amp;lt; result_of::num_rows&amp;lt;double[5][10]&amp;gt;::type::value &amp;lt;&amp;lt; std::endl;
&lt;br&gt;for( result_of::begin&amp;lt; T, 1 &amp;gt;::type i = begin&amp;lt; 1 &amp;gt;( t ); i != end&amp;lt; 1 &amp;gt;( t ); 
&lt;br&gt;++i ) {
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;some bits are still a bit rough, but hopefully you're getting the idea. And, 
&lt;br&gt;of course, what drives all this, is the user-friendliness of calls to blas 
&lt;br&gt;and lapack. The goal is to be able to do
&lt;br&gt;&lt;br&gt;blas::some_op( trans( a ), row( b, 2 ) );
&lt;br&gt;&lt;br&gt;for any matrix and/or vector object. I would like to push this towards a 
&lt;br&gt;first kind of official RFC. I you're interested in the effort of getting a 
&lt;br&gt;(the second) stable version of numeric_bindings out of the door, please 
&lt;br&gt;don't hestitate to get involved.
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Rutger
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546943&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546943&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jackymiao@...&lt;/a&gt;
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546943&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546943&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--New-traits-system-tp26539653p26546943.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539653</id>
	<title>[bindings] New traits system</title>
	<published>2009-11-27T01:03:17Z</published>
	<updated>2009-11-27T01:03:17Z</updated>
	<author>
		<name>Rutger ter Borg-2</name>
	</author>
	<content type="html">&lt;br&gt;Dear all,
&lt;br&gt;&lt;br&gt;Herewith some news surrounding the numeric_bindings. I've rewritten the 
&lt;br&gt;traits part from the ground up, with simplicity, flexibility and efficiency 
&lt;br&gt;in mind.
&lt;br&gt;&lt;br&gt;Most notable differences:
&lt;br&gt;&lt;br&gt;&amp;nbsp;* Full MPL-compatible support for static matrices and vectors, for all the 
&lt;br&gt;compile-time-junkies out there.
&lt;br&gt;&amp;nbsp;* No more separate matrix and vector trait classes, all through one adaptor
&lt;br&gt;&amp;nbsp;* Built-in automatic reinterpretations (matrix-&amp;gt;vector, vector-&amp;gt;matrix, 
&lt;br&gt;scalar-&amp;gt;matrix (!), etc.) for all objects
&lt;br&gt;&amp;nbsp;* Proxies and views through meta-adaptors, e.g., row(), column(), trans(), 
&lt;br&gt;upper(), lower()
&lt;br&gt;&amp;nbsp;* Compile-time selected iterators (so far, linear data structures only, 
&lt;br&gt;triangular and yale sparse to come)
&lt;br&gt;&amp;nbsp;* IO support; pretty printing (will give nice output for all bindable 
&lt;br&gt;objects)
&lt;br&gt;&amp;nbsp;* Easier directory structure (std/vector.hpp, ublas/vector.hpp, etc.). 
&lt;br&gt;Directory name is the most specific namespace-name of the object, filename 
&lt;br&gt;is the lower-cased name of the object.
&lt;br&gt;&amp;nbsp;* Support for C arrays, standard vectors, uBLAS, TNT, eigen2, more to be 
&lt;br&gt;added such as glas and mtl4
&lt;br&gt;&lt;br&gt;Some examples of what's possible:
&lt;br&gt;&lt;br&gt;double a[5][10];
&lt;br&gt;std::cout &amp;lt;&amp;lt; column( a, 0 ) &amp;lt;&amp;lt; std::endl;
&lt;br&gt;std::sort( begin( row( a, 2 ) ), end( row( a, 2 ) ) );
&lt;br&gt;std::cout &amp;lt;&amp;lt; result_of::num_rows&amp;lt;double[5][10]&amp;gt;::type::value &amp;lt;&amp;lt; std::endl;
&lt;br&gt;for( result_of::begin&amp;lt; T, 1 &amp;gt;::type i = begin&amp;lt; 1 &amp;gt;( t ); i != end&amp;lt; 1 &amp;gt;( t ); 
&lt;br&gt;++i ) {
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;some bits are still a bit rough, but hopefully you're getting the idea. And, 
&lt;br&gt;of course, what drives all this, is the user-friendliness of calls to blas 
&lt;br&gt;and lapack. The goal is to be able to do
&lt;br&gt;&lt;br&gt;blas::some_op( trans( a ), row( b, 2 ) );
&lt;br&gt;&lt;br&gt;for any matrix and/or vector object. I would like to push this towards a 
&lt;br&gt;first kind of official RFC. I you're interested in the effort of getting a 
&lt;br&gt;(the second) stable version of numeric_bindings out of the door, please 
&lt;br&gt;don't hestitate to get involved.
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Rutger
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539653&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539653&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--New-traits-system-tp26539653p26539653.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26521175</id>
	<title>Re: thread safety of matrix multiplication</title>
	<published>2009-11-25T14:11:51Z</published>
	<updated>2009-11-25T14:11:51Z</updated>
	<author>
		<name>James C. Sutherland</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 25, 2009, at 1:36 PM, Gunter Winkler wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Am Wednesday 25 November 2009 schrieb James C. Sutherland:
&lt;br&gt;&amp;gt;&amp;gt; If I have a ublas matrix object, is it thread safe w.r.t. matvec
&lt;br&gt;&amp;gt;&amp;gt; operations? &amp;nbsp;In other words:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; typedef boost::numeric::ublas::compressed_matrix&amp;lt; double,
&lt;br&gt;&amp;gt;&amp;gt; boost::numeric::ublas::row_major &amp;gt; MatType;
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; MatType mat; &amp;nbsp;// both threads use the same matrix object.
&lt;br&gt;&amp;gt;&amp;gt; VecType a1, b1, a2, b2;
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; // ... assemble matrix and vectors ...
&lt;br&gt;&amp;gt;&amp;gt; // &amp;nbsp;...
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; // thread 1 code:
&lt;br&gt;&amp;gt;&amp;gt; axpy_prod( mat, a1, b1, true );
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; // thread2 code:
&lt;br&gt;&amp;gt;&amp;gt; axpy_prod( mat, a2, b2, true );
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Should this be thread safe? &amp;nbsp;My observation is that it is NOT. &amp;nbsp;I am
&lt;br&gt;&amp;gt;&amp;gt; getting memory corruption somewhere. &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is quite strange because axpy_prod only reads from the matrix and 
&lt;br&gt;&amp;gt; a1. The only write access is to b1. Can you try to build a small test 
&lt;br&gt;&amp;gt; program that shows the memory corruption?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Gunter, thanks for this confirmation. &amp;nbsp;As it turns out, I think I was on the wrong path, and I think that the memory corruption may be coming from elsewhere. &amp;nbsp;I will continue to investigate and let you know if anything turns up. 
&lt;br&gt;&lt;br&gt;However, given that my interface to uBLAS ensures that the matrix object is const when axpy_prod is called, it is unlikely that uBLAS is corrupting memory unless there are mutable members or some const_cast going on internally.
&lt;br&gt;&lt;br&gt;Thanks again,
&lt;br&gt;&lt;br&gt;James
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521175&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26521175&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/thread-safety-of-matrix-multiplication-tp26514304p26521175.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26519875</id>
	<title>Re: thread safety of matrix multiplication</title>
	<published>2009-11-25T12:36:28Z</published>
	<updated>2009-11-25T12:36:28Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Am Wednesday 25 November 2009 schrieb James C. Sutherland:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If I have a ublas matrix object, is it thread safe w.r.t. matvec
&lt;br&gt;&amp;gt; operations? &amp;nbsp;In other words:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; typedef boost::numeric::ublas::compressed_matrix&amp;lt; double,
&lt;br&gt;&amp;gt; boost::numeric::ublas::row_major &amp;gt; MatType;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; MatType mat; &amp;nbsp;// both threads use the same matrix object.
&lt;br&gt;&amp;gt; VecType a1, b1, a2, b2;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // ... assemble matrix and vectors ...
&lt;br&gt;&amp;gt; // &amp;nbsp;...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // thread 1 code:
&lt;br&gt;&amp;gt; axpy_prod( mat, a1, b1, true );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // thread2 code:
&lt;br&gt;&amp;gt; axpy_prod( mat, a2, b2, true );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Should this be thread safe? &amp;nbsp;My observation is that it is NOT. &amp;nbsp;I am
&lt;br&gt;&amp;gt; getting memory corruption somewhere. &amp;nbsp;
&lt;/div&gt;&lt;/div&gt;This is quite strange because axpy_prod only reads from the matrix and 
&lt;br&gt;a1. The only write access is to b1. Can you try to build a small test 
&lt;br&gt;program that shows the memory corruption?
&lt;br&gt;&lt;br&gt;&amp;gt; Also, it seems that axpy_prod is no longer included in the boost
&lt;br&gt;&amp;gt; documentation (html) - is that function being deprecated in favor of
&lt;br&gt;&amp;gt; the prod(...) functions?
&lt;br&gt;&lt;br&gt;axpy_prod is mentioned here: 
&lt;br&gt;&lt;a href=&quot;http://www.boost.org/doc/libs/1_41_0/libs/numeric/ublas/doc/operations_overview.htm#32products&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.boost.org/doc/libs/1_41_0/libs/numeric/ublas/doc/operations_overview.htm#32products&lt;/a&gt;&lt;br&gt;&lt;br&gt;However I agree, that the operations.hpp needs more documentation. 
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519875&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26519875&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26519875/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/thread-safety-of-matrix-multiplication-tp26514304p26519875.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26514304</id>
	<title>thread safety of matrix multiplication</title>
	<published>2009-11-25T07:07:12Z</published>
	<updated>2009-11-25T07:07:12Z</updated>
	<author>
		<name>James C. Sutherland</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;If I have a ublas matrix object, is it thread safe w.r.t. matvec operations? &amp;nbsp;In other words:&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;&lt;br&gt;typedef boost::numeric::ublas::compressed_matrix&amp;lt; double, boost::numeric::ublas::row_major &amp;gt; MatType;&lt;br&gt;&lt;br&gt;MatType mat; &amp;nbsp;// both threads use the same matrix object.&lt;br&gt;VecType a1, b1, a2, b2;&lt;/blockquote&gt;&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;// ... assemble matrix and vectors ...&lt;/blockquote&gt;&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;// &amp;nbsp;...&lt;/blockquote&gt;&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;&lt;br&gt;// thread 1 code:&lt;br&gt;axpy_prod( mat, a1, b1, true );&lt;br&gt;&lt;br&gt;// thread2 code:&lt;br&gt;axpy_prod( mat, a2, b2, true );&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Should this be thread safe? &amp;nbsp;My observation is that it is NOT. &amp;nbsp;I am getting memory corruption somewhere. &amp;nbsp;Interestingly, this same approach works fine with a different linear algebra package that I have used. &amp;nbsp;So I suspect that ublas is keeping some internal data in the matrix object that is being altered by application of axpy_prod?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Also, it seems that axpy_prod is no longer included in the boost documentation (html) - is that function being deprecated in favor of the prod(...) functions?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;James&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26514304&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26514304&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/thread-safety-of-matrix-multiplication-tp26514304p26514304.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26496953</id>
	<title>Matrix initialization in a constructor</title>
	<published>2009-11-24T06:34:48Z</published>
	<updated>2009-11-24T06:34:48Z</updated>
	<author>
		<name>l.v</name>
	</author>
	<content type="html">&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;font: inherit;&quot;&gt;&lt;BLOCKQUOTE style=&quot;PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid&quot;&gt;
&lt;DIV class=plainMail&gt;Hi,&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;I want to use the ublas.boost library to handle&amp;nbsp;matrices&amp;nbsp;which size is parametrized.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;what I need is to be able to pass as a parameter the matrix's size to the constructor.&amp;nbsp;Actually I am not using C++&amp;nbsp;but SystemC (which is a C++ class for hardware description)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;Why using uBlas? it is to be able to do some linear algebra operations&amp;nbsp;easily and efficiently (scalar multiplication, adding two matrices, and maybe solving a linear system of equations).&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;I have used this coding, which I found in the documentation but it gives errors.&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=plainMail&gt;&lt;FONT size=2&gt;
&lt;DIV&gt;matrix&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; m ();&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; m_size;&amp;nbsp; //my parameter for size&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;//and in my constructor:&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;m.resize (m_size, m_size, &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;it&amp;nbsp;fails with this error : &lt;FONT size=1&gt;&lt;/DIV&gt;
&lt;DIV&gt;: error C2228: left of '.resize' must have class/struct/union type&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;and with this one:&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT size=2&gt;&lt;FONT size=1&gt;
&lt;DIV&gt;: error C2660: 'mcpx_boost::m' : function does not take 2 arguments&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;I am using Visual Studio 7.1 &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;Does anyone know where is the problem?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;thanks for answering&lt;/FONT&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;DIV&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT size=2&gt;&lt;FONT size=1&gt;&lt;FONT style=&quot;BACKGROUND-COLOR: #000000&quot; size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;DIV&gt;&lt;FONT color=#008000&gt;&lt;FONT size=2&gt;&lt;FONT size=1&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;




&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26496953&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26496953&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Matrix-initialization-in-a-constructor-tp26496953p26496953.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26434414</id>
	<title>Re: now that 1.41.0 is out...</title>
	<published>2009-11-19T13:28:38Z</published>
	<updated>2009-11-19T13:28:38Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Neal Becker schrieb:
&lt;br&gt;&amp;gt; How about this patch?
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; ublas mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26434414&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;&amp;gt; Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26434414&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;guwi17@...&lt;/a&gt;
&lt;br&gt;Yes. Could you please open a trac ticket and attach the patch. This way
&lt;br&gt;we can track the issue easily.
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26434414&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26434414&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/now-that-1.41.0-is-out...-tp26433387p26434414.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26433387</id>
	<title>now that 1.41.0 is out...</title>
	<published>2009-11-19T12:19:57Z</published>
	<updated>2009-11-19T12:19:57Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">How about this patch?&lt;br /&gt;&lt;tt&gt;[diff]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;diff -r c6dde043ee33 boost/numeric/ublas/traits.hpp
&lt;br&gt;--- a/boost/numeric/ublas/traits.hpp	Wed Nov 18 18:41:53 2009 -0500
&lt;br&gt;+++ b/boost/numeric/ublas/traits.hpp	Thu Nov 19 15:17:42 2009 -0500
&lt;br&gt;@@ -23,6 +23,11 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;boost/type_traits.hpp&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;complex&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/typeof/typeof.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/utility/enable_if.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/type_traits/is_float.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/type_traits/is_integral.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/mpl/and.hpp&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// anonymous namespace to avoid ADL issues
&lt;br&gt;&amp;nbsp;namespace {
&lt;br&gt;@@ -40,6 +45,87 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;namespace boost { namespace numeric { namespace ublas {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2 ) {
&lt;br&gt;+	return R (in1) + in2;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;+	return in1 + R (in2);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator- (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+	return R (in1) - in2;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator- (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;+	return in1 - R (in2);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator* (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+	return R (in1) * in2;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator* (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;+	return in1 * R(in2);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator/ (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+	return R(in1) / in2;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator/ (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;+	return in1 / R (in2);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433387&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433387&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/now-that-1.41.0-is-out...-tp26433387p26433387.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26419039</id>
	<title>Re: [newbie] submatrix and rest of a matrix</title>
	<published>2009-11-18T17:44:26Z</published>
	<updated>2009-11-18T17:44:26Z</updated>
	<author>
		<name>Nasos Iliopoulos</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hello David,&lt;br&gt;&lt;br&gt;&amp;gt; and last but not least in order to better understand how ublas works:&lt;br&gt;&amp;gt; - what is the difference between matrix&amp;amp; , matrix_expression&amp;amp; and matrix_reference&lt;br&gt;&lt;br&gt;matrix is the class that represent a matrix, as you would probably expect it. It has its storage, indexing etc.&lt;br&gt;matrix_expression is what makes possible &quot;expression templates&quot; in ublas. i.e. when you have two matrices A, B and you add them:&lt;br&gt;A+B;&lt;br&gt;ublas will not actually do the addition but rather create a referenced abstract tree to that operation: a matrix_expression that holds what operations need to be done in order to evaluate it. This is only evaluated when you for example do:&lt;br&gt;C=A+B;&lt;br&gt;The benefit from that is performance, since temporaries are avoided and operations are done only once (or almost).&lt;br&gt;matrix_reference is a reference to a Matrix expression.&lt;br&gt;&lt;br&gt;You will most probably need matrix and matrix_expression in your programs.&lt;br&gt;Best Regards&lt;br&gt;Nasos&lt;br&gt;&lt;br&gt;&lt;hr id=&quot;stopSpelling&quot;&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;br&gt;Date: Wed, 18 Nov 2009 20:52:43 +0100&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;guwi17@...&lt;/a&gt;&lt;br&gt;Subject: Re: [ublas] [newbie] submatrix and rest of a matrix&lt;br&gt;&lt;br&gt;Hi Gunter,&lt;br&gt;&lt;br&gt;indeed, my drawing was false. I'm not very good with ascii art. I wanted to split in 3 with the rows not the column, but the problem remains the same :-)&lt;br&gt;&lt;br&gt;In fact, I use indirect_array to generate my submatrices now and it works pretty well.&lt;br&gt;

&lt;br&gt;So finally, in order to be a little bit matlab like (in my case it would be very convenient) can I do the following, I didn't find anything that allow to do that directly from the library:&lt;br&gt;&lt;br&gt;(1) initialize an indirect_array with a vector&amp;lt;int&amp;gt; or something like that,&lt;br&gt;

(2) initialize an indirect_array and do some kind of composition with range like&lt;br&gt;indirect_array ia(range1, range2, range3, ... etc)&lt;br&gt;&lt;br&gt;and last but not least in order to better understand how ublas works:&lt;br&gt;- what is the difference between matrix&amp;amp; , matrix_expression&amp;amp; and matrix_reference&lt;br&gt;

&lt;br&gt;Thanks for your help. Very appreciated.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;David&lt;br&gt;&lt;br&gt;&lt;div class=&quot;ecxgmail_quote&quot;&gt;On Wed, Nov 18, 2009 at 20:33, Gunter Winkler &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a target=&quot;_top&quot;&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;guwi17@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;ecxgmail_quote&quot; style=&quot;padding-left: 1ex;&quot;&gt;Hello David,&lt;br&gt;
&lt;br&gt;
please read below:&lt;br&gt;
&lt;br&gt;
David Bellot schrieb:&lt;br&gt;
&lt;div class=&quot;ecxim&quot;&gt;&amp;gt; Hi Ublas users,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; this is a newbie question:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am implementing a cross validation algorithm and for that purpose I&lt;br&gt;
&amp;gt; need to split up a big matrix X1 and a big vector Y1 many times in&lt;br&gt;
&amp;gt; different way. The idea is to use a percentage of the initial dataset&lt;br&gt;
&amp;gt; (X1 and Y1) to fit a model and the rest of this dataset to test it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Let's say my fitting procedure is&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; double fit(const matrix&amp;lt;double&amp;gt;&amp;amp; X, const vector&amp;lt;double&amp;gt;&amp;amp; y)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; and initially I have my big dataset defined as&lt;br&gt;
&amp;gt; matrix&amp;lt;double&amp;gt; X1;&lt;br&gt;
&amp;gt; vector&amp;lt;double&amp;gt; Y1;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; during the loop of the cross-validation algo, I split up X1 and Y1 in&lt;br&gt;
&amp;gt; the following manner to obtain a Xtraining and Ytraining dataset and&lt;br&gt;
&amp;gt; Xtest and Ytest dataset:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt; | &amp;nbsp; &amp;nbsp;Xtraining &amp;nbsp; | Xtest | Xtraining |&lt;br&gt;
&amp;gt; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br&gt;
&amp;gt; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt; | Ytraining &amp;nbsp; &amp;nbsp; &amp;nbsp;| Ytest | Ytraining |&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&lt;/div&gt;This looks like you split the matrix into 3 sets of columns and the&lt;br&gt;
vector into 3 sets of corresponding elements.&lt;br&gt;
&lt;div class=&quot;ecxim&quot;&gt;&amp;gt;&lt;br&gt;
&amp;gt; Of course, Xtest and Ytest is at a different position at each step of&lt;br&gt;
&amp;gt; the loop.&lt;br&gt;
&amp;gt; Xtest and Ytest are easy to obtain with a matrix_range&amp;lt;matrix&amp;lt;double&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; However Xtraining and Ytraining require a copy of the data to a&lt;br&gt;
&amp;gt; temporary matrix (and vector).&lt;br&gt;
&lt;/div&gt;Why do you need a copy? The indirect_array a able to select a set of&lt;br&gt;
columns and rows from a matrix.&lt;br&gt;
&lt;div class=&quot;ecxim&quot;&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; So how can I do that efficiently (indirect_array ? other ?) and do I&lt;br&gt;
&amp;gt; need to redefine the prototype of my fit function ?&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;mfg&lt;br&gt;
Gunter&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
ublas mailing list&lt;br&gt;
&lt;a target=&quot;_top&quot;&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;&lt;/a&gt;&lt;br&gt;
&lt;a target=&quot;_top&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;
Sent to: &lt;a target=&quot;_top&quot;&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;David Bellot, PhD&lt;br&gt;&lt;a target=&quot;_top&quot;&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;/a&gt;&lt;br&gt;&lt;a target=&quot;_top&quot;&gt;http://david.bellot.free.fr&lt;/a&gt;&lt;br&gt;&lt;br&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Hotmail: Trusted email with powerful SPAM protection. &lt;a href='http://clk.atdmt.com/GBL/go/177141665/direct/01/' target='_new' rel=&quot;nofollow&quot;&gt;Sign up now.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419039&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-newbie--submatrix-and-rest-of-a-matrix-tp26394548p26419039.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26414531</id>
	<title>Re: [newbie] submatrix and rest of a matrix</title>
	<published>2009-11-18T11:52:43Z</published>
	<updated>2009-11-18T11:52:43Z</updated>
	<author>
		<name>David Bellot</name>
	</author>
	<content type="html">Hi Gunter,&lt;br&gt;&lt;br&gt;indeed, my drawing was false. I&amp;#39;m not very good with ascii art. I wanted to split in 3 with the rows not the column, but the problem remains the same :-)&lt;br&gt;&lt;br&gt;In fact, I use indirect_array to generate my submatrices now and it works pretty well.&lt;br&gt;

&lt;br&gt;So finally, in order to be a little bit matlab like (in my case it would be very convenient) can I do the following, I didn&amp;#39;t find anything that allow to do that directly from the library:&lt;br&gt;&lt;br&gt;(1) initialize an indirect_array with a vector&amp;lt;int&amp;gt; or something like that,&lt;br&gt;

(2) initialize an indirect_array and do some kind of composition with range like&lt;br&gt;indirect_array ia(range1, range2, range3, ... etc)&lt;br&gt;&lt;br&gt;and last but not least in order to better understand how ublas works:&lt;br&gt;- what is the difference between matrix&amp;amp; , matrix_expression&amp;amp; and matrix_reference&lt;br&gt;

&lt;br&gt;Thanks for your help. Very appreciated.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;David&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 18, 2009 at 20:33, Gunter Winkler &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;guwi17@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hello David,&lt;br&gt;
&lt;br&gt;
please read below:&lt;br&gt;
&lt;br&gt;
David Bellot schrieb:&lt;br&gt;
&lt;div class=&quot;im&quot;&gt;&amp;gt; Hi Ublas users,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; this is a newbie question:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am implementing a cross validation algorithm and for that purpose I&lt;br&gt;
&amp;gt; need to split up a big matrix X1 and a big vector Y1 many times in&lt;br&gt;
&amp;gt; different way. The idea is to use a percentage of the initial dataset&lt;br&gt;
&amp;gt; (X1 and Y1) to fit a model and the rest of this dataset to test it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Let&amp;#39;s say my fitting procedure is&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; double fit(const matrix&amp;lt;double&amp;gt;&amp;amp; X, const vector&amp;lt;double&amp;gt;&amp;amp; y)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; and initially I have my big dataset defined as&lt;br&gt;
&amp;gt; matrix&amp;lt;double&amp;gt; X1;&lt;br&gt;
&amp;gt; vector&amp;lt;double&amp;gt; Y1;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; during the loop of the cross-validation algo, I split up X1 and Y1 in&lt;br&gt;
&amp;gt; the following manner to obtain a Xtraining and Ytraining dataset and&lt;br&gt;
&amp;gt; Xtest and Ytest dataset:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt; |    Xtraining   | Xtest | Xtraining |&lt;br&gt;
&amp;gt; |                |       |           |&lt;br&gt;
&amp;gt; |                |       |           |&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&amp;gt; | Ytraining      | Ytest | Ytraining |&lt;br&gt;
&amp;gt; |------------------------------------|&lt;br&gt;
&lt;/div&gt;This looks like you split the matrix into 3 sets of columns and the&lt;br&gt;
vector into 3 sets of corresponding elements.&lt;br&gt;
&lt;div class=&quot;im&quot;&gt;&amp;gt;&lt;br&gt;
&amp;gt; Of course, Xtest and Ytest is at a different position at each step of&lt;br&gt;
&amp;gt; the loop.&lt;br&gt;
&amp;gt; Xtest and Ytest are easy to obtain with a matrix_range&amp;lt;matrix&amp;lt;double&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; However Xtraining and Ytraining require a copy of the data to a&lt;br&gt;
&amp;gt; temporary matrix (and vector).&lt;br&gt;
&lt;/div&gt;Why do you need a copy? The indirect_array a able to select a set of&lt;br&gt;
columns and rows from a matrix.&lt;br&gt;
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; So how can I do that efficiently (indirect_array ? other ?) and do I&lt;br&gt;
&amp;gt; need to redefine the prototype of my fit function ?&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;mfg&lt;br&gt;
Gunter&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
ublas mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;
Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;David Bellot, PhD&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://david.bellot.free.fr&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://david.bellot.free.fr&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414531&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-newbie--submatrix-and-rest-of-a-matrix-tp26394548p26414531.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26414230</id>
	<title>Re: [newbie] submatrix and rest of a matrix</title>
	<published>2009-11-18T11:33:50Z</published>
	<updated>2009-11-18T11:33:50Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Hello David,
&lt;br&gt;&lt;br&gt;please read below:
&lt;br&gt;&lt;br&gt;David Bellot schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Ublas users,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; this is a newbie question:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am implementing a cross validation algorithm and for that purpose I
&lt;br&gt;&amp;gt; need to split up a big matrix X1 and a big vector Y1 many times in
&lt;br&gt;&amp;gt; different way. The idea is to use a percentage of the initial dataset
&lt;br&gt;&amp;gt; (X1 and Y1) to fit a model and the rest of this dataset to test it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Let's say my fitting procedure is
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; double fit(const matrix&amp;lt;double&amp;gt;&amp; X, const vector&amp;lt;double&amp;gt;&amp; y)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and initially I have my big dataset defined as
&lt;br&gt;&amp;gt; matrix&amp;lt;double&amp;gt; X1;
&lt;br&gt;&amp;gt; vector&amp;lt;double&amp;gt; Y1;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; during the loop of the cross-validation algo, I split up X1 and Y1 in
&lt;br&gt;&amp;gt; the following manner to obtain a Xtraining and Ytraining dataset and
&lt;br&gt;&amp;gt; Xtest and Ytest dataset:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; |------------------------------------|
&lt;br&gt;&amp;gt; | &amp;nbsp; &amp;nbsp;Xtraining &amp;nbsp; | Xtest | Xtraining |
&lt;br&gt;&amp;gt; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |
&lt;br&gt;&amp;gt; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |
&lt;br&gt;&amp;gt; |------------------------------------|
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; |------------------------------------|
&lt;br&gt;&amp;gt; | Ytraining &amp;nbsp; &amp;nbsp; &amp;nbsp;| Ytest | Ytraining |
&lt;br&gt;&amp;gt; |------------------------------------|
&lt;/div&gt;This looks like you split the matrix into 3 sets of columns and the
&lt;br&gt;vector into 3 sets of corresponding elements.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Of course, Xtest and Ytest is at a different position at each step of
&lt;br&gt;&amp;gt; the loop.
&lt;br&gt;&amp;gt; Xtest and Ytest are easy to obtain with a matrix_range&amp;lt;matrix&amp;lt;double&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; However Xtraining and Ytraining require a copy of the data to a
&lt;br&gt;&amp;gt; temporary matrix (and vector).
&lt;br&gt;Why do you need a copy? The indirect_array a able to select a set of
&lt;br&gt;columns and rows from a matrix.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So how can I do that efficiently (indirect_array ? other ?) and do I
&lt;br&gt;&amp;gt; need to redefine the prototype of my fit function ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414230&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26414230&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-newbie--submatrix-and-rest-of-a-matrix-tp26394548p26414230.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26394548</id>
	<title>[newbie] submatrix and rest of a matrix</title>
	<published>2009-11-17T09:55:48Z</published>
	<updated>2009-11-17T09:55:48Z</updated>
	<author>
		<name>David Bellot</name>
	</author>
	<content type="html">&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;Hi Ublas users,&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;this is a newbie question:&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;I am implementing a cross validation algorithm and for that purpose I need to split up a big matrix X1 and a big vector Y1 many times in different way. The idea is to use a percentage of the initial dataset (X1 and Y1) to fit a model and the rest of this dataset to test it.&lt;/span&gt;&lt;br&gt;

&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;Let&amp;#39;s say my fitting procedure is &lt;br&gt;&lt;br&gt;double fit(const matrix&amp;lt;double&amp;gt;&amp;amp; X, const vector&amp;lt;double&amp;gt;&amp;amp; y)&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;and initially I have my big dataset defined as&lt;br&gt;matrix&amp;lt;double&amp;gt; X1;&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;vector&amp;lt;double&amp;gt; Y1;&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;during the loop of the cross-validation algo, I split up X1 and Y1 in the following manner to obtain a Xtraining and Ytraining dataset and Xtest and Ytest dataset:&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|------------------------------------|&lt;br&gt;|    Xtraining   | Xtest | Xtraining |&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|                |       |           |&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|                |       |           |&lt;/span&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;

&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|------------------------------------|&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|------------------------------------|&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;| Ytraining      | Ytest | Ytraining |&lt;/span&gt;&lt;br style=&quot;font-family: courier new,monospace;&quot;&gt;


&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;|------------------------------------|&lt;br&gt;&lt;br&gt;Of course, Xtest and Ytest is at a different position at each step of the loop.&lt;br&gt;Xtest and Ytest are easy to obtain with a matrix_range&amp;lt;matrix&amp;lt;double&amp;gt; &amp;gt;&lt;br&gt;

However Xtraining and Ytraining require a copy of the data to a temporary matrix (and vector). &lt;br&gt;&lt;br&gt;And this is my problem ! The dataset is to big and making a copy costs too much. I cannot afford having 2 copies of the dataset in memory (and copying them all the time).&lt;br&gt;

&lt;br&gt;So how can I do that efficiently (indirect_array ? other ?) and do I need to redefine the prototype of my fit function ?&lt;br&gt;&lt;br&gt;Best Regards,&lt;br&gt;David&lt;br&gt;&lt;/span&gt;
&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;David Bellot, PhD&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394548&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.bellot@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://david.bellot.free.fr&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://david.bellot.free.fr&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394548&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394548&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-newbie--submatrix-and-rest-of-a-matrix-tp26394548p26394548.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26394032</id>
	<title>Re: vector generator</title>
	<published>2009-11-17T09:26:30Z</published>
	<updated>2009-11-17T09:26:30Z</updated>
	<author>
		<name>Matwey V. Kornilov</name>
	</author>
	<content type="html">&lt;br&gt;I assumed the same conditions as for the boost.ublas.
&lt;br&gt;&lt;br&gt;Nasos Iliopoulos wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Nice and very useful.
&lt;br&gt;&amp;gt; Since I see no license statement on your code should I assume it is public
&lt;br&gt;&amp;gt; domain? Thanks!
&lt;br&gt;&amp;gt; Nasos
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26394032&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/vector-generator-tp26014314p26394032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26390416</id>
	<title>Re: vector generator</title>
	<published>2009-11-17T06:01:03Z</published>
	<updated>2009-11-17T06:01:03Z</updated>
	<author>
		<name>Nasos Iliopoulos</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Nice and very useful. &lt;br&gt;Since I see no license statement on your code should I assume it is public domain?&lt;br&gt;Thanks!&lt;br&gt;Nasos&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390416&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390416&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matwey.kornilov@...&lt;/a&gt;&lt;br&gt;&amp;gt; Date: Thu, 22 Oct 2009 21:48:40 +0400&lt;br&gt;&amp;gt; Subject: [ublas] vector generator&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Hi all,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I tried to make vector object that acts like generator. It means that if &lt;br&gt;&amp;gt; there is rule that associates value for any index uniquely, it isn't &lt;br&gt;&amp;gt; necessary to store that values in the memory. I wrote simple generator in &lt;br&gt;&amp;gt; order to research uBLAS abilities(in attach). I would like to get comments &lt;br&gt;&amp;gt; on the code. It works perfectly for me but it is possible that it can be &lt;br&gt;&amp;gt; made more general and there are some uBLAS tips I've missed.&lt;br&gt;&amp;gt; &lt;/div&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Bing brings you maps, menus, and reviews organized in one place. &lt;a href='http://www.bing.com/search?q=restaurants&amp;form=MFESRP&amp;publ=WLHMTAG&amp;crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1' target='_new' rel=&quot;nofollow&quot;&gt;Try it now.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390416&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390416&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/vector-generator-tp26014314p26390416.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26390344</id>
	<title>Re: prod(trans(M),M) performance?</title>
	<published>2009-11-17T05:56:41Z</published>
	<updated>2009-11-17T05:56:41Z</updated>
	<author>
		<name>Nasos Iliopoulos</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Witold,&lt;br&gt;In gcc with -DNDEBUG (and -O2), it runs on 5.7 secs on my laptop.&lt;br&gt;
&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot;&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
I would suggest&amp;nbsp; putting 
&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot;&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
&lt;p style=&quot;margin: 0px; text-indent: 0px;&quot;&gt;&lt;!--StartFragment--&gt;#define NDEBUG&lt;!--EndFragment--&gt;&lt;/p&gt;before including any ublas headers in your cpp files (just in case the compiler is not doing its job) and make sure that you are compiling in RELEASE mode.&lt;br&gt;&lt;br&gt;my timings:&lt;br&gt;(qtcreator as ide under linux:)&lt;br&gt;5.7 secs with -DNDEBUG, RELEASE mode&lt;br&gt;65 secs with -DNDEBUG, DEBUG mode&lt;br&gt;30 secs without -DNDEBUG, RELEASE mode&lt;br&gt;76 without -DNDEBUG, DEBUG mode&lt;br&gt;&lt;br&gt;Best&lt;br&gt;Nasos&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;hr id=&quot;stopSpelling&quot;&gt;Date: Mon, 26 Oct 2009 09:54:06 +0100&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390344&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wewolski@...&lt;/a&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390344&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;&lt;br&gt;Subject: [ublas] prod(trans(M),M) performance?&lt;br&gt;&lt;br&gt;Hello,&lt;br&gt;hope you can give me some advice.&lt;br&gt;I tried different types of matrices matrix, mapped_matrix etc.&lt;br&gt;The best performance for matrix matrix multiplication I am getting with ublas::matrix type. However, even with this type the computation time in release mode for a 1000x1000 band matrix, measured with boost::timer is tremendous: 111.4 s.&lt;br&gt;
&lt;br&gt;I am new to ublas so I am wondering how I can improve to code/compiler settings etc to speed up the computation.&lt;br&gt;
&lt;br&gt;Preporcessor settings: NDEBUG;_CONSOLE;BOOST_UBLAS_NDEBUG, VS2008,&amp;nbsp; Boost 1.37&lt;br clear=&quot;all&quot;&gt;&lt;div id=&quot;ecx:1pt&quot; class=&quot;ecxii ecxgt&quot;&gt;&lt;br&gt;namespace bubla = boost::numeric::ublas;&lt;br&gt;typedef double value_type;&lt;br&gt;typedef bubla::matrix&amp;lt;value_type&amp;gt; SparseMatrix;&lt;br&gt;
unsigned int m = 1000;&lt;br&gt;SparseMatrix D(m,m,3*m), X;&lt;br&gt;&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; D, bubla::range (0, m ), bubla::range(0, m )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br&gt;std::fill(mvr.begin(),mvr.end(),value_type(3.));&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr2&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; D, bubla::range (0, m-1 ), bubla::range(1, m )&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br&gt;std::fill(mvr2.begin(),mvr2.end(),value_type(1.));&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr3&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; D, bubla::range (1, m ), bubla::range(0, m )&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br&gt;std::fill(mvr2.begin(),mvr2.end(),value_type(1.));&lt;br&gt;boost::timer&amp;nbsp; t1;&lt;br&gt;t1.restart();&lt;br&gt;X = bubla::trans( D );&lt;br&gt;X = bubla::prod( X , D ) ;&lt;br&gt;std::cout &amp;lt;&amp;lt;&amp;nbsp; t1.elapsed() &amp;lt;&amp;lt; std::endl;&lt;br&gt;
&lt;br&gt;regards&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Witold Eryk Wolski&lt;br&gt;&lt;br&gt;Heidmark str 5&lt;br&gt;D-28329 Bremen&lt;br&gt;tel.: 04215261837&lt;br&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Windows 7: I wanted simpler, now it's simpler. &lt;a href='http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009' target='_new' rel=&quot;nofollow&quot;&gt;I'm a rock star.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390344&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26390344&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/prod%28trans%28M%29%2CM%29-performance--tp26056200p26390344.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26186510</id>
	<title>Re: Changes in 1.41</title>
	<published>2009-11-03T12:58:44Z</published>
	<updated>2009-11-03T12:58:44Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Jesse Perla schrieb:
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; There were a lot of small bugs and a few features with patches
&lt;br&gt;&amp;gt; recently. Did these make it into boost 1.41? &amp;nbsp;Should I work off of the
&lt;br&gt;&amp;gt; trunk instead?
&lt;br&gt;&amp;gt;
&lt;br&gt;The first beta of 1.41 is about to be released tomorrow or the day
&lt;br&gt;after. So please have a look if something is missing which was urgently
&lt;br&gt;required.
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26186510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26186510&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Changes-in-1.41-tp26078518p26186510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26103201</id>
	<title>Re: Changes in 1.41</title>
	<published>2009-10-28T15:19:14Z</published>
	<updated>2009-10-28T15:19:14Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Jesse Perla wrote:
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; There were a lot of small bugs and a few features with patches recently=
&lt;br&gt;=2E
&lt;br&gt;&amp;gt; Did these make it into boost 1.41? &amp;nbsp;Should I work off of the trunk inst=
&lt;br&gt;ead?
&lt;br&gt;&lt;br&gt;The status of trunk/release can be checked via the open/closed tickets.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://svn.boost.org/trac/boost/query?status=3Dassigned&amp;status=3Dclosed&amp;=&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://svn.boost.org/trac/boost/query?status=3Dassigned&amp;status=3Dclosed&amp;=&lt;/a&gt;&lt;br&gt;status=3Dnew&amp;status=3Dreopened&amp;group=3Dstatus&amp;component=3DuBLAS&amp;order=3Dp=
&lt;br&gt;riority&amp;col=3Did&amp;col=3Dsummary&amp;col=3Dcomponent&amp;col=3Dmilestone&amp;col=3Dstat=
&lt;br&gt;us&amp;col=3Dtype&amp;milestone=3DBoost+1.41.0
&lt;br&gt;&lt;br&gt;I did not add all patches from the list to the trunk, yet. However I
&lt;br&gt;commited everything that is mentioned in the tickets. Please have a
&lt;br&gt;short look and tell me what patch is still missing.
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br&gt;PS: any help with documentation (plain HTML) is welcome.
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26103201&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26103201&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (269 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26103201/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Changes-in-1.41-tp26078518p26103201.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26078518</id>
	<title>Changes in 1.41</title>
	<published>2009-10-27T07:18:06Z</published>
	<updated>2009-10-27T07:18:06Z</updated>
	<author>
		<name>Jesse Perla</name>
	</author>
	<content type="html">Hi guys,
&lt;br&gt;There were a lot of small bugs and a few features with patches &amp;nbsp;
&lt;br&gt;recently. Did these make it into boost 1.41? &amp;nbsp;Should I work off of the &amp;nbsp;
&lt;br&gt;trunk instead?
&lt;br&gt;&lt;br&gt;-Jesse 
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26078518&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26078518&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Changes-in-1.41-tp26078518p26078518.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26056299</id>
	<title>[bindings][UMFPack]A bug may be found in UMFPack Bindings</title>
	<published>2009-10-26T02:03:22Z</published>
	<updated>2009-10-26T02:03:22Z</updated>
	<author>
		<name>Cheng W.</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I have concern this mailing list for months, and I use uBlas and other packages in my program.
&lt;br&gt;Yesterday, I found a sentence in umfpack.hpp (line 886) as
&lt;br&gt;&amp;nbsp; &amp;nbsp; assert(traits::spmatrix_size1 (A) == traits::spmatrix_size1 (A));
&lt;br&gt;but it seems to be
&lt;br&gt;&amp;nbsp; &amp;nbsp; assert(traits::spmatrix_size1 (A) == traits::spmatrix_size2 (A));
&lt;br&gt;&lt;br&gt;Am I right, or some others have found it before?
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Dr. Cheng W.,
&lt;br&gt;School of Civil Engineering,
&lt;br&gt;Tongji University,
&lt;br&gt;Shanghai,
&lt;br&gt;P. R. China&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--UMFPack-A-bug-may-be-found-in-UMFPack-Bindings-tp26056299p26056299.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26056200</id>
	<title>prod(trans(M),M) performance?</title>
	<published>2009-10-26T01:54:06Z</published>
	<updated>2009-10-26T01:54:06Z</updated>
	<author>
		<name>W Eryk Wolski</name>
	</author>
	<content type="html">Hello,&lt;br&gt;hope you can give me some advice.&lt;br&gt;I tried different types of matrices matrix, mapped_matrix etc.&lt;br&gt;The best performance for matrix matrix multiplication I am getting with ublas::matrix type. However, even with this type the computation time in release mode for a 1000x1000 band matrix, measured with boost::timer is tremendous: 111.4 s.&lt;br&gt;
&lt;br&gt;I am new to ublas so I am wondering how I can improve to code/compiler settings etc to speed up the computation.&lt;br&gt;
&lt;br&gt;Preporcessor settings: NDEBUG;_CONSOLE;BOOST_UBLAS_NDEBUG, VS2008,  Boost 1.37&lt;br clear=&quot;all&quot;&gt;&lt;div id=&quot;:1pt&quot; class=&quot;ii gt&quot;&gt;&lt;br&gt;namespace bubla = boost::numeric::ublas;&lt;br&gt;typedef double value_type;&lt;br&gt;typedef bubla::matrix&amp;lt;value_type&amp;gt; SparseMatrix;&lt;br&gt;
unsigned int m = 1000;&lt;br&gt;SparseMatrix D(m,m,3*m), X;&lt;br&gt;&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr(&lt;br&gt;                    D, bubla::range (0, m ), bubla::range(0, m )&lt;br&gt;
                    );&lt;br&gt;std::fill(mvr.begin(),mvr.end(),value_type(3.));&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr2&lt;br&gt;                    (&lt;br&gt;                    D, bubla::range (0, m-1 ), bubla::range(1, m )&lt;br&gt;

                    );&lt;br&gt;std::fill(mvr2.begin(),mvr2.end(),value_type(1.));&lt;br&gt;bubla::matrix_vector_range&amp;lt;SparseMatrix &amp;gt; mvr3&lt;br&gt;                    (&lt;br&gt;                    D, bubla::range (1, m ), bubla::range(0, m )&lt;br&gt;

                    );&lt;br&gt;std::fill(mvr2.begin(),mvr2.end(),value_type(1.));&lt;br&gt;boost::timer  t1;&lt;br&gt;t1.restart();&lt;br&gt;X = bubla::trans( D );&lt;br&gt;X = bubla::prod( X , D ) ;&lt;br&gt;std::cout &amp;lt;&amp;lt;  t1.elapsed() &amp;lt;&amp;lt; std::endl;&lt;br&gt;
&lt;br&gt;regards&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Witold Eryk Wolski&lt;br&gt;&lt;br&gt;Heidmark str 5&lt;br&gt;D-28329 Bremen&lt;br&gt;tel.: 04215261837&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26056200&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26056200&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/prod%28trans%28M%29%2CM%29-performance--tp26056200p26056200.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26014314</id>
	<title>vector generator</title>
	<published>2009-10-22T10:48:40Z</published>
	<updated>2009-10-22T10:48:40Z</updated>
	<author>
		<name>Matwey V. Kornilov</name>
	</author>
	<content type="html">&lt;br&gt;Hi all,
&lt;br&gt;&lt;br&gt;I tried to make vector object that acts like generator. It means that if 
&lt;br&gt;there is rule that associates value for any index uniquely, it isn't 
&lt;br&gt;necessary to store that values in the memory. I wrote simple generator in 
&lt;br&gt;order to research uBLAS abilities(in attach). I would like to get comments 
&lt;br&gt;on the code. It works perfectly for me but it is possible that it can be 
&lt;br&gt;made more general and there are some uBLAS tips I've missed.
&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[vector_generator.cpp]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;#include &amp;lt;boost/numeric/ublas/vector.hpp&amp;gt;
&lt;br&gt;#include &amp;lt;boost/numeric/ublas/vector_expression.hpp&amp;gt;
&lt;br&gt;#include &amp;lt;boost/numeric/ublas/io.hpp&amp;gt;
&lt;br&gt;&lt;br&gt;using namespace boost::numeric::ublas;
&lt;br&gt;&lt;br&gt;template&amp;lt;class F, class ALLOC = std::allocator&amp;lt;typename F::result_type&amp;gt; &amp;gt; class vector_generator; // Forward declaration
&lt;br&gt;&lt;br&gt;template&amp;lt;class F, class ALLOC&amp;gt;
&lt;br&gt;class vector_generator:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public vector_container&amp;lt; vector_generator&amp;lt;F, ALLOC&amp;gt; &amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef F functor_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef vector_generator&amp;lt;F, ALLOC&amp;gt; self_type;
&lt;br&gt;public:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename F::result_type value_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename ALLOC::size_type size_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename ALLOC::difference_type difference_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef const value_type&amp; const_reference;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef value_type&amp; reference;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef sparse_tag storage_category;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef const value_type* const_pointer;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef const vector_reference&amp;lt;const self_type&amp;gt; const_closure_type;
&lt;br&gt;public:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector_generator( functor_type functor, size_type size = 0 ):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_( size ), functor_( functor ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type size() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return size_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void resize( size_type size, bool /*preserve*/ = true ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_ = size;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const value_type operator()( size_type i ) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return functor_( i );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //reference operator()(size_type i); no non-const access
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const value_type operator[]( size_type i ) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return functor_( i );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //reference operator[](size_type i); no non-const access
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Iterators
&lt;br&gt;public:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class const_iterator;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator find( size_type i ) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return const_iterator( (*this), i );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; class const_iterator:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public container_const_reference&amp;lt; self_type &amp;gt;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public bidirectional_iterator_base&amp;lt;sparse_bidirectional_iterator_tag, const_iterator, value_type&amp;gt; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename self_type::difference_type difference_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename self_type::value_type value_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename self_type::size_type size_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename self_type::const_reference reference;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename self_type::const_pointer pointer;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Construction and destruction
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator( size_type i = 0 ):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; container_const_reference&amp;lt;self_type&amp;gt;(), it_(i) {}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator(const self_type &amp;v, size_type i ):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; container_const_reference&amp;lt;self_type&amp;gt;(v), it_(i) {}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator &amp;operator++() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ++it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return *this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator &amp;operator--() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return *this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator &amp;operator += (difference_type n) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; it_ += n;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return *this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator &amp;operator -= (difference_type n) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; it_ -= n;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return *this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value_type operator*() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BOOST_UBLAS_CHECK (it_ &amp;gt;= (*this) ().begin ().it_ &amp;&amp; it_ &amp;lt; (*this) ().end ().it_, bad_index ());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (*this)()( it_ );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value_type operator[](difference_type n) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return *(it_ + n);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type index() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BOOST_UBLAS_CHECK (it_ &amp;gt;= (*this)().begin ().it_ &amp;&amp; it_ &amp;lt; (*this)().end ().it_, bad_index ());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool operator == (const const_iterator &amp;it) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BOOST_UBLAS_CHECK (&amp;(*this) () == &amp;it (), external_logic ());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return it_ == it.it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool operator &amp;lt; (const const_iterator &amp;it) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BOOST_UBLAS_CHECK (&amp;(*this) () == &amp;it (), external_logic ());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return it_ &amp;lt; it.it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type it_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef const_iterator iterator;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef reverse_iterator_base&amp;lt;const_iterator&amp;gt; const_reverse_iterator;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator begin() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return find( 0 );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_iterator end() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return find( size() );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_reverse_iterator rbegin() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return const_reverse_iterator( end() );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_reverse_iterator rend() const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return const_reverse_iterator( begin() );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;private:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type &amp;nbsp; &amp;nbsp;size_;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; functor_type functor_;
&lt;br&gt;};
&lt;br&gt;&lt;br&gt;struct tfun {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef double result_type;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result_type operator() ( unsigned int i ) const {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result_type(i);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;};
&lt;br&gt;&lt;br&gt;int main() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector_generator&amp;lt;tfun&amp;gt; vg( tfun() ,12);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector&amp;lt;double&amp;gt; vec( vg );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; vg*2 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; vec &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; inner_prod(vg,vg) &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26014314&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26014314&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/vector-generator-tp26014314p26014314.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25918957</id>
	<title>Re: LU decomposition: how can I get a unique solution?</title>
	<published>2009-10-15T19:33:20Z</published>
	<updated>2009-10-15T19:33:20Z</updated>
	<author>
		<name>Alfredo Correa-3</name>
	</author>
	<content type="html">Pietro,
&lt;br&gt;&lt;br&gt;this is because LU decomposition is not unique. ublas (or blas) makes
&lt;br&gt;it unique by imposing that the diagonal or L are ones. You can do the
&lt;br&gt;same in your manual calculation to make sure.
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Oct 15, 2009 at 4:38 AM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25918957&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pietro.Mele@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have a problem finding the LU decomposition of a matrix. I want to impose
&lt;br&gt;&amp;gt; the L diagonal elements to be equal to 1. I included the code, and this is
&lt;br&gt;&amp;gt; the (wrong?) result:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Initial matrix:
&lt;br&gt;&amp;gt; 4 3
&lt;br&gt;&amp;gt; 6 3
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *** Expected result (found with pen and paper): ***
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; L matrix:
&lt;br&gt;&amp;gt; 1    0
&lt;br&gt;&amp;gt; 1.5  1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; U matrix:
&lt;br&gt;&amp;gt; 4   3
&lt;br&gt;&amp;gt; 0  -1.5
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Inverse matrix:
&lt;br&gt;&amp;gt;  -0.5  0.5
&lt;br&gt;&amp;gt;   1   -2/3
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *** Matrices returned by ublas/lu.hpp: ***
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; lu_factorize A:
&lt;br&gt;&amp;gt; 4   3/4
&lt;br&gt;&amp;gt; 6   -3/2
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; L matrix:
&lt;br&gt;&amp;gt; 1  0
&lt;br&gt;&amp;gt; 6  1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; U matrix:
&lt;br&gt;&amp;gt; 4   3/4
&lt;br&gt;&amp;gt; 0  -3/2
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Inverse matrix:
&lt;br&gt;&amp;gt;  -0.5  0.5
&lt;br&gt;&amp;gt;   1   -2/3
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So the inverse matrices are the same, but the L and U matrices used to find
&lt;br&gt;&amp;gt; them are different (I got them from the lu factorized initial matrix). Who's
&lt;br&gt;&amp;gt; right? Ublas or my pen?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With &amp;quot;ublas/lu.hpp&amp;quot; how can I specify the values of the diagonal elements
&lt;br&gt;&amp;gt; needed to obtain a unique solution (i.e. unique L and U matrices)?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thank you for any help.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Pietro
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Boost 1.40.0
&lt;br&gt;&amp;gt; O.S.:  Linux (RedHat)
&lt;br&gt;&amp;gt; gcc:  3.4.6
&lt;br&gt;&amp;gt; kernel:  2.6.9-55.ELsmp
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tags: ublas, lu.hpp, lu decomposition, boost, matrix
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Pietro Mele
&lt;br&gt;&amp;gt; CFD Software Developer
&lt;br&gt;&amp;gt; T. +44 1235 777700
&lt;br&gt;&amp;gt; F. +44 1235 764705
&lt;br&gt;&amp;gt; attwilliams.com
&lt;br&gt;&amp;gt; ____________________
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Williams Grand Prix Engineering Limited. Registered in England no. 1297497.
&lt;br&gt;&amp;gt; VAT no. GB292559325. This email is confidential. If you are not the
&lt;br&gt;&amp;gt; addressee, please contact us by reply.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; ublas mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25918957&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;&amp;gt; Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25918957&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;correaa@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25918957&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25918957&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/LU-decomposition%3A-how-can-I-get-a-unique-solution--tp25907054p25918957.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25917839</id>
	<title>Re: LU decomposition: how can I get a unique solution?</title>
	<published>2009-10-15T16:51:27Z</published>
	<updated>2009-10-15T16:51:27Z</updated>
	<author>
		<name>Paul C. Leopardi-2</name>
	</author>
	<content type="html">Hi Pietro,
&lt;br&gt;If you multiply the L and U matrices obtained from ublas/lu.hpp, do you get 
&lt;br&gt;your original matrix? Octave gives me 
&lt;br&gt;&lt;br&gt;octave:9&amp;gt; [1 0;6 1]*[4 3/4.0;0 -3/2.0]
&lt;br&gt;ans =
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; 4.00000 &amp;nbsp; &amp;nbsp;0.75000
&lt;br&gt;&amp;nbsp; &amp;nbsp;24.00000 &amp;nbsp; &amp;nbsp;3.00000
&lt;br&gt;&lt;br&gt;octave:11&amp;gt; [1 0;1.5 1]*[4 3;0 -1.5]
&lt;br&gt;ans =
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;4 &amp;nbsp; 3
&lt;br&gt;&amp;nbsp; &amp;nbsp;6 &amp;nbsp; 3
&lt;br&gt;&lt;br&gt;Best, Paul
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25917839&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25917839&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/LU-decomposition%3A-how-can-I-get-a-unique-solution--tp25907054p25917839.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25907054</id>
	<title>LU decomposition: how can I get a unique solution?</title>
	<published>2009-10-15T04:38:13Z</published>
	<updated>2009-10-15T04:38:13Z</updated>
	<author>
		<name>Pietro.Mele</name>
	</author>
	<content type="html">&lt;FONT face=&quot;Default Sans Serif,Verdana,Arial,Helvetica,sans-serif&quot; size=2&gt;&lt;x&gt;I have a problem finding the LU decomposition of a matrix. I want to impose the L diagonal elements to be equal to 1. I included the code, and this is the (wrong?) result:&lt;br&gt;&lt;br&gt;Initial matrix:&lt;br&gt;4 3&lt;br&gt;6 3&lt;br&gt;&lt;br&gt;*** Expected result (found with pen and paper): ***&lt;br&gt;&lt;br&gt;L matrix:&lt;br&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;br&gt;1.5&amp;nbsp; 1&lt;br&gt;&lt;br&gt;U matrix:&lt;br&gt;4&amp;nbsp;&amp;nbsp; 3&lt;br&gt;0&amp;nbsp; -1.5&lt;br&gt;&lt;br&gt;Inverse matrix:&lt;br&gt;&amp;nbsp;-0.5&amp;nbsp; 0.5&lt;br&gt;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; -2/3&lt;br&gt;&lt;br&gt;*** Matrices returned by ublas/lu.hpp: ***&lt;br&gt;&lt;br&gt;lu_factorize A:&lt;br&gt;4&amp;nbsp;&amp;nbsp; 3/4&lt;br&gt;6&amp;nbsp;&amp;nbsp; -3/2&lt;br&gt;&lt;br&gt;L matrix:&lt;br&gt;1&amp;nbsp; 0&lt;br&gt;6&amp;nbsp; 1&lt;br&gt;&lt;br&gt;U matrix:&lt;br&gt;4&amp;nbsp;&amp;nbsp; 3/4&lt;br&gt;0&amp;nbsp; -3/2&lt;br&gt;&lt;br&gt;Inverse matrix:&lt;br&gt;&amp;nbsp;-0.5&amp;nbsp; 0.5&lt;br&gt;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; -2/3&lt;br&gt;&lt;br&gt;So the inverse matrices are the same, but the L and U matrices used to find them are different (I got them from the lu factorized initial matrix). Who's right? Ublas or my pen?&lt;br&gt;&lt;br&gt;With &quot;ublas/lu.hpp&quot; how can I specify the values of the diagonal elements needed to obtain a unique solution (i.e. unique L and U matrices)?&lt;br&gt;&lt;br&gt;Thank you for any help.&lt;br&gt;&lt;br&gt;Pietro&lt;br&gt;&lt;br&gt;&lt;br&gt;Boost 1.40.0&lt;br&gt;O.S.:&amp;nbsp; Linux (RedHat)&lt;br&gt;gcc:&amp;nbsp; 3.4.6&lt;br&gt;kernel:&amp;nbsp; 2.6.9-55.ELsmp&lt;br&gt;&lt;br&gt;Tags: ublas, lu.hpp, lu decomposition, boost, matrix&lt;br&gt;&lt;br&gt;&lt;/x&gt;&lt;/FONT&gt;

&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;font size=1 color=#4f4f4f face=&quot;Arial&quot;&gt;&lt;b&gt;Pietro Mele&lt;/b&gt;&lt;/font&gt;
&lt;br&gt;&lt;font size=1 color=#808080 face=&quot;Arial&quot;&gt;CFD Software Developer&lt;/font&gt;
&lt;br&gt;&lt;font size=1 color=#808080 face=&quot;Arial&quot;&gt;T. +44 1235 777700&lt;/font&gt;
&lt;br&gt;&lt;font size=1 color=#808080 face=&quot;Arial&quot;&gt;F. +44 1235 764705&lt;/font&gt;
&lt;br&gt;&lt;a href=http://www.attwilliams.com target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;font size=1 color=blue face=&quot;Arial&quot;&gt;attwilliams.com&lt;/font&gt;&lt;/a&gt;
&lt;br&gt;&lt;font size=1 color=#8f8f8f&gt;____________________&lt;/font&gt;&lt;font size=1 color=#8f8f8f&gt;&lt;br&gt;
&lt;/font&gt;
&lt;br&gt;&lt;font size=1 face=&quot;sans-serif&quot;&gt;&lt;i&gt;Williams Grand Prix Engineering Limited.
Registered in England no. 1297497. VAT no. GB292559325. This email is confidential.
If you are not the addressee, please contact us by reply.&lt;/i&gt;&lt;/font&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25907054&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25907054&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;LUquestion.cpp&lt;/strong&gt; (1K) &lt;a href=&quot;http://old.nabble.com/attachment/25907054/0/LUquestion.cpp&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/LU-decomposition%3A-how-can-I-get-a-unique-solution--tp25907054p25907054.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25890505</id>
	<title>[bindings][blas] Included CBLAS support</title>
	<published>2009-10-14T05:48:32Z</published>
	<updated>2009-10-14T05:48:32Z</updated>
	<author>
		<name>Rutger ter Borg-2</name>
	</author>
	<content type="html">&lt;br&gt;Hello all,
&lt;br&gt;&lt;br&gt;I've included a first version of support for CBLAS and CUBLAS in the BLAS 
&lt;br&gt;bindings. The idea is to select the BLAS backend by defining a preprocessor 
&lt;br&gt;variable. E.g., write your code once, 
&lt;br&gt;&lt;br&gt;blas::gemv( 'N', 1.0, A, x, 1.0, y );
&lt;br&gt;&lt;br&gt;and compile and link the same program against different implementations 
&lt;br&gt;using a preprocessor statement,
&lt;br&gt;&lt;br&gt;g++ test.cpp -lblas
&lt;br&gt;g++ -DBOOST_NUMERIC_BINDINGS_BLAS_CBLAS test.cpp -lcblas
&lt;br&gt;g++ -DBOOST_NUMERIC_BINDINGS_BLAS_CUBLAS test.cpp -lcublas
&lt;br&gt;&lt;br&gt;To unify the interface, the character arguments to BLAS calls are translated 
&lt;br&gt;to cblas enums, matrix orientation is assumed to be column major by default. 
&lt;br&gt;IMHO, this makes the ATLAS bindings obsolete.
&lt;br&gt;&lt;br&gt;If you're able to help testing and/or have suggestions, please let me know.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Rutger
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25890505&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25890505&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--blas--Included-CBLAS-support-tp25890505p25890505.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25879655</id>
	<title>How to implement functions that take matrix_expressions as arguments?</title>
	<published>2009-10-11T03:14:22Z</published>
	<updated>2009-10-11T03:14:22Z</updated>
	<author>
		<name>Heiko Schroeder-2</name>
	</author>
	<content type="html">Dear uBLAS developers and community!
&lt;br&gt;&lt;br&gt;Recently, I have decided to implement some numerics in C++ and after
&lt;br&gt;comparing some linear algebra libraries I finally decided to use uBLAS.
&lt;br&gt;Reasons were that I appreciate the high level of abstraction of uBLAS,
&lt;br&gt;the nice design and the possibility to extend it to my own needs.
&lt;br&gt;Unfortunately, the last part is what is giving me quite a hard time.
&lt;br&gt;Certainly, this has to do with the fact that I'm still quite new to C++
&lt;br&gt;and a bloody rookie to template metaprogramming. So, I appreciate any help.
&lt;br&gt;&lt;br&gt;But let me come to the concrete problem: I am trying to implement some
&lt;br&gt;functions that I need to use. Those are the commutator (anticommutator),
&lt;br&gt;trace (partial trace) and outer product of matrix expressions and I'd
&lt;br&gt;like to implement them as general as possible in the spirit of the
&lt;br&gt;matrix expression concept implemented in uBLAS. Moreover, I'd like to be
&lt;br&gt;able to use them as part of more complicated expressions in the form of,
&lt;br&gt;e.q., result = trace(matrix1) - trace(commute(matrix2,
&lt;br&gt;matrix4-matrix5)). And now, I am already hitting a wall trying to
&lt;br&gt;implement the commutator.
&lt;br&gt;&lt;br&gt;My first primitive approach was to define
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /* \brief Compute the commutator of two matrix expressions. */
&lt;br&gt;&amp;nbsp; &amp;nbsp; template&amp;lt;class M1, class M2, class M3&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; BOOST_UBLAS_INLINE
&lt;br&gt;&amp;nbsp; &amp;nbsp; M3 &amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; commute(M3 &amp; m3,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const M1 &amp; m1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const M2 &amp; m2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return m3 = prod(m1, m2) - prod(m2, m1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;in the style of operations.hpp. This works, but I have to keep track of
&lt;br&gt;the correct result types by the first argument (or so I understand the
&lt;br&gt;need for putting M3 &amp; there), which is against the use how I envisage it.
&lt;br&gt;&lt;br&gt;Then I tried to implement something along the lines
&lt;br&gt;&lt;br&gt;template &amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;BOOST_UBLAS_INLINE
&lt;br&gt;???::result_type
&lt;br&gt;commute(const matrix_expression&amp;lt;E1&amp;gt; &amp; e1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const matrix_expression&amp;lt;E2&amp;gt; &amp; e2) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; typedef ???::expression_type expression_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; return expression_type(e1(), e2());
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;and noticed that I have to determine the ??? type. Since the commutator
&lt;br&gt;uses operations already defined in uBLAS, I thought it should be
&lt;br&gt;possible to simply reuse the existing expression types and tried the
&lt;br&gt;following, using templated typedefs:
&lt;br&gt;&lt;br&gt;template&amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;struct matrix_commutator_traits {
&lt;br&gt;&amp;nbsp; &amp;nbsp; /* \brief templated typedef for matrix expression traits type of a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;matrix product */
&lt;br&gt;&amp;nbsp; &amp;nbsp; template&amp;lt;class A, class B&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct prod {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typedef ublas::matrix_matrix_binary_traits&amp;lt;typename A::value_type, A,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename B::value_type, B&amp;gt; type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /* \brief templated typedef for matrix expression traits type of
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;element-wise matrix expression difference */
&lt;br&gt;&amp;nbsp; &amp;nbsp; template&amp;lt;class A, class B&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct diff {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename ublas::matrix_binary_traits&amp;lt;A,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ublas::scalar_minus&amp;lt;typename A::value_type,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename B::value_type&amp;gt; &amp;gt; type;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename diff&amp;lt;typename diff&amp;lt;E1, E2&amp;gt;::type::result_type,
&lt;br&gt;typename diff&amp;lt;E2, E1&amp;gt;::type::result_type&amp;gt;::type type;
&lt;br&gt;}; //struct
&lt;br&gt;&lt;br&gt;/* \brief commutator of two matrix expressions */
&lt;br&gt;template &amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;BOOST_UBLAS_INLINE
&lt;br&gt;typename matrix_commutator_traits&amp;lt;E1, E2&amp;gt;::type::result_type
&lt;br&gt;commute(const ublas::matrix_expression&amp;lt;E1&amp;gt; &amp; e1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const ublas::matrix_expression&amp;lt;E2&amp;gt; &amp; e2 )
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; typedef typename matrix_commutator_traits&amp;lt;E1,
&lt;br&gt;E2&amp;gt;::type::expression_type expression_type;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; return expression_type(e1 (), e2 ());
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;But it didn't work: error: no matching function for call to &amp;lt;complicated
&lt;br&gt;template type&amp;gt;::matrix_binary(..., ...). (complete error message is
&lt;br&gt;attached).
&lt;br&gt;&lt;br&gt;Now I'm wondering whether I'm doing it wrong on a fundamental level or
&lt;br&gt;whether I'm just missing some detail. Any help is appreciated.
&lt;br&gt;&lt;br&gt;Sorry for the rather lengthy mail and best regards,
&lt;br&gt;&lt;br&gt;Heiko Schroeder
&lt;br&gt;&lt;br&gt;&lt;br /&gt;Using commute() in the following code snippet:
&lt;br&gt;&lt;br&gt;ublas::matrix&amp;lt;complex&amp;lt;double&amp;gt; &amp;gt; sigma[4];
&lt;br&gt;//... defining the sigmas as 2x2 matrices
&lt;br&gt;cout &amp;lt;&amp;lt; commute(sigma[1], sigma[2]) &amp;lt;&amp;lt; endl;
&lt;br&gt;&lt;br&gt;I get the following error:
&lt;br&gt;&lt;br&gt;ublas_extensions.cpp: In function âtypename matrix_commutator_traits&amp;lt;E1, E2&amp;gt;::type::result_type commute(const boost::numeric::ublas::matrix_expression&amp;lt;E&amp;gt;&amp;, const boost::numeric::ublas::matrix_expression&amp;lt;E2&amp;gt;&amp;) [with E1 = boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, E2 = boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;]â:
&lt;br&gt;ublas_extensions.cpp:123: &amp;nbsp; instantiated from here
&lt;br&gt;ublas_extensions.cpp:98: error: no matching function for call to âboost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;::matrix_binary(const boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;&amp;, const boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;&amp;)â
&lt;br&gt;/usr/include/boost/numeric/ublas/matrix_expression.hpp:1710: note: candidates are: boost::numeric::ublas::matrix_binary&amp;lt;E1, E2, F&amp;gt;::matrix_binary(const E1&amp;, const E2&amp;) [with E1 = boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, E2 = boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, F = boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt;]
&lt;br&gt;/usr/include/boost/numeric/ublas/matrix_expression.hpp:1684: note: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;::matrix_binary(const boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;&amp;)
&lt;br&gt;&lt;br&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25879655&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25879655&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-implement-functions-that-take-matrix_expressions-as-arguments--tp25879655p25879655.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25879665</id>
	<title>How to implement functions that take matrix_expressions as arguments?</title>
	<published>2009-10-11T03:12:19Z</published>
	<updated>2009-10-11T03:12:19Z</updated>
	<author>
		<name>Heiko Schroeder-2</name>
	</author>
	<content type="html">Dear uBLAS developers and community!
&lt;br&gt;&lt;br&gt;Recently, I have decided to implement some numerics in C++ and after 
&lt;br&gt;comparing some linear algebra libraries I finally decided to use uBLAS. 
&lt;br&gt;Reasons were that I appreciate the high level of abstraction of uBLAS, 
&lt;br&gt;the nice design and the possibility to extend it to my own needs. 
&lt;br&gt;Unfortunately, the last part is what is giving me quite a hard time. 
&lt;br&gt;Certainly, this has to do with the fact that I'm still quite new to C++ 
&lt;br&gt;and a bloody rookie to template metaprogramming. So, I appreciate any help.
&lt;br&gt;&lt;br&gt;But let me come to the concrete problem: I am trying to implement some 
&lt;br&gt;functions that I need to use. Those are the commutator (anticommutator), 
&lt;br&gt;trace (partial trace) and outer product of matrix expressions and I'd 
&lt;br&gt;like to implement them as general as possible in the spirit of the 
&lt;br&gt;matrix expression concept implemented in uBLAS. Moreover, I'd like to be 
&lt;br&gt;able to use them as part of more complicated expressions in the form of, 
&lt;br&gt;e.q., result = trace(matrix1) - trace(commute(matrix2, 
&lt;br&gt;matrix4-matrix5)). And now, I am already hitting a wall trying to 
&lt;br&gt;implement the commutator.
&lt;br&gt;&lt;br&gt;My first primitive approach was to define
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;/* \brief Compute the commutator of two matrix expressions. */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;class M1, class M2, class M3&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;BOOST_UBLAS_INLINE
&lt;br&gt;&amp;nbsp; &amp;nbsp;M3 &amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;commute(M3 &amp; m3,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const M1 &amp; m1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const M2 &amp; m2)
&lt;br&gt;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return m3 = prod(m1, m2) - prod(m2, m1);
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;in the style of operations.hpp. This works, but I have to keep track of 
&lt;br&gt;the correct result types by the first argument (or so I understand the 
&lt;br&gt;need for putting M3 &amp; there), which is against the use how I envisage it.
&lt;br&gt;&lt;br&gt;Then I tried to implement something along the lines
&lt;br&gt;&lt;br&gt;template &amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;BOOST_UBLAS_INLINE
&lt;br&gt;???::result_type
&lt;br&gt;commute(const matrix_expression&amp;lt;E1&amp;gt; &amp; e1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const matrix_expression&amp;lt;E2&amp;gt; &amp; e2) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;typedef ???::expression_type expression_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp;return expression_type(e1(), e2());
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;and noticed that I have to determine the ??? type. Since the commutator 
&lt;br&gt;uses operations already defined in uBLAS, I thought it should be 
&lt;br&gt;possible to simply reuse the existing expression types and tried the 
&lt;br&gt;following, using templated typedefs:
&lt;br&gt;&lt;br&gt;template&amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;struct matrix_commutator_traits {
&lt;br&gt;&amp;nbsp; &amp;nbsp;/* \brief templated typedef for matrix expression traits type of a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; matrix product */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;class A, class B&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct prod {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;typedef ublas::matrix_matrix_binary_traits&amp;lt;typename A::value_type, A,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename B::value_type, B&amp;gt; type;
&lt;br&gt;&amp;nbsp; &amp;nbsp;};
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;/* \brief templated typedef for matrix expression traits type of
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; element-wise matrix expression difference */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;class A, class B&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct diff {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename ublas::matrix_binary_traits&amp;lt;A,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ublas::scalar_minus&amp;lt;typename A::value_type,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename B::value_type&amp;gt; &amp;gt; type;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;};
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename diff&amp;lt;typename diff&amp;lt;E1, E2&amp;gt;::type::result_type, 
&lt;br&gt;typename diff&amp;lt;E2, E1&amp;gt;::type::result_type&amp;gt;::type type;
&lt;br&gt;}; //struct
&lt;br&gt;&lt;br&gt;/* \brief commutator of two matrix expressions */
&lt;br&gt;template &amp;lt;class E1, class E2&amp;gt;
&lt;br&gt;BOOST_UBLAS_INLINE
&lt;br&gt;typename matrix_commutator_traits&amp;lt;E1, E2&amp;gt;::type::result_type
&lt;br&gt;commute(const ublas::matrix_expression&amp;lt;E1&amp;gt; &amp; e1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const ublas::matrix_expression&amp;lt;E2&amp;gt; &amp; e2 )
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;typedef typename matrix_commutator_traits&amp;lt;E1, 
&lt;br&gt;E2&amp;gt;::type::expression_type expression_type;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;return expression_type(e1 (), e2 ());
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;But it didn't work: error: no matching function for call to &amp;lt;complicated 
&lt;br&gt;template type&amp;gt;::matrix_binary(..., ...). (complete error message is 
&lt;br&gt;attached).
&lt;br&gt;&lt;br&gt;Now I'm wondering whether I'm doing it wrong on a fundamental level or 
&lt;br&gt;whether I'm just missing some detail. Any help is appreciated.
&lt;br&gt;&lt;br&gt;Sorry for the rather lengthy mail and best regards,
&lt;br&gt;&lt;br&gt;Heiko Schroeder
&lt;br&gt;&lt;br /&gt;Using commute() in the following code snippet:
&lt;br&gt;&lt;br&gt;ublas::matrix&amp;lt;complex&amp;lt;double&amp;gt; &amp;gt; sigma[4];
&lt;br&gt;//... defining the sigmas as 2x2 matrices
&lt;br&gt;cout &amp;lt;&amp;lt; commute(sigma[1], sigma[2]) &amp;lt;&amp;lt; endl;
&lt;br&gt;&lt;br&gt;I get the following error:
&lt;br&gt;&lt;br&gt;ublas_extensions.cpp: In function âtypename matrix_commutator_traits&amp;lt;E1, E2&amp;gt;::type::result_type commute(const boost::numeric::ublas::matrix_expression&amp;lt;E&amp;gt;&amp;, const boost::numeric::ublas::matrix_expression&amp;lt;E2&amp;gt;&amp;) [with E1 = boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, E2 = boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;]â:
&lt;br&gt;ublas_extensions.cpp:123: &amp;nbsp; instantiated from here
&lt;br&gt;ublas_extensions.cpp:98: error: no matching function for call to âboost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;::matrix_binary(const boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;&amp;, const boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;&amp;)â
&lt;br&gt;/usr/include/boost/numeric/ublas/matrix_expression.hpp:1710: note: candidates are: boost::numeric::ublas::matrix_binary&amp;lt;E1, E2, F&amp;gt;::matrix_binary(const E1&amp;, const E2&amp;) [with E1 = boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, E2 = boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, F = boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt;]
&lt;br&gt;/usr/include/boost/numeric/ublas/matrix_expression.hpp:1684: note: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;::matrix_binary(const boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix_binary&amp;lt;boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::matrix&amp;lt;std::complex&amp;lt;double&amp;gt;, boost::numeric::ublas::basic_row_major&amp;lt;long unsigned int, long int&amp;gt;, boost::numeric::ublas::unbounded_array&amp;lt;std::complex&amp;lt;double&amp;gt;, std::allocator&amp;lt;std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;, boost::numeric::ublas::scalar_minus&amp;lt;std::complex&amp;lt;double&amp;gt;, std::complex&amp;lt;double&amp;gt; &amp;gt; &amp;gt;&amp;)
&lt;br&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25879665&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25879665&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-implement-functions-that-take-matrix_expressions-as-arguments--tp25879665p25879665.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25839309</id>
	<title>Re: [bindings] lapack errors</title>
	<published>2009-10-10T16:07:47Z</published>
	<updated>2009-10-10T16:07:47Z</updated>
	<author>
		<name>Uldarico Muico-2</name>
	</author>
	<content type="html">They compile fine now. &amp;nbsp;Thanks for the heads-up.
&lt;br&gt;&lt;br&gt;-uldarico
&lt;br&gt;&lt;br&gt;On Oct 9, 2009, at 1:48 PM, Rutger ter Borg wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Uldarico Muico wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Perhaps you should use std::max&amp;lt;integer_t&amp;gt; explicitly?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've updated it to std::max&amp;lt; std::ptrdiff_t &amp;gt;(...), that's the &amp;nbsp;
&lt;br&gt;&amp;gt; return type
&lt;br&gt;&amp;gt; of all size/count-related traits functions.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On a related note, I also get
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; boost/numeric/bindings/lapack/driver.hpp:12:51: error: boost/numeric/
&lt;br&gt;&amp;gt;&amp;gt; bindings/lapack/solve.hpp: No such file or directory
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Should be fixed, too. Please note that the uplo stuff for sysv will &amp;nbsp;
&lt;br&gt;&amp;gt; most
&lt;br&gt;&amp;gt; likely change.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Rutger
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; ublas mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839309&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;&amp;gt; Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839309&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;um@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839309&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25839309&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--Some-thoughts-tp25504031p25839309.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25827707</id>
	<title>Re: [bindings] lapack errors</title>
	<published>2009-10-09T13:48:47Z</published>
	<updated>2009-10-09T13:48:47Z</updated>
	<author>
		<name>Rutger ter Borg-2</name>
	</author>
	<content type="html">Uldarico Muico wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Perhaps you should use std::max&amp;lt;integer_t&amp;gt; explicitly?
&lt;br&gt;&lt;br&gt;I've updated it to std::max&amp;lt; std::ptrdiff_t &amp;gt;(...), that's the return type 
&lt;br&gt;of all size/count-related traits functions.
&lt;br&gt;&lt;br&gt;&amp;gt; On a related note, I also get
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; boost/numeric/bindings/lapack/driver.hpp:12:51: error: boost/numeric/
&lt;br&gt;&amp;gt; bindings/lapack/solve.hpp: No such file or directory
&lt;br&gt;&lt;br&gt;Should be fixed, too. Please note that the uplo stuff for sysv will most 
&lt;br&gt;likely change.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Rutger
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25827707&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25827707&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bindings--Some-thoughts-tp25504031p25827707.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25825662</id>
	<title>Re: [feature request] new free functions for matrix/vector sizes</title>
	<published>2009-10-09T11:16:37Z</published>
	<updated>2009-10-09T11:16:37Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Marco Guazzone schrieb:
&lt;br&gt;&amp;gt; OK Got it!
&lt;br&gt;&amp;gt; I'll try to follow this way in future implementations.
&lt;br&gt;&amp;gt; For what concern my committed code, I've seen some code need still to
&lt;br&gt;&amp;gt; be adequated. If you I can help you to change it. Let me know.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Feel free to send patches at any time.
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25825662&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25825662&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-feature-request--new-free-functions-for-matrix-vector-sizes-tp25442334p25825662.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25825535</id>
	<title>Re: Proposed change: use BOOST_TYPEOF</title>
	<published>2009-10-09T11:05:44Z</published>
	<updated>2009-10-09T11:05:44Z</updated>
	<author>
		<name>Gunter Winkler</name>
	</author>
	<content type="html">Neal Becker schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Since we have BOOST_TYPEOF, use it in type_traits.hpp:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; template&amp;lt;class X, class Y&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; struct promote_traits {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef type_deduction_detail::base_result_of&amp;lt;X, Y&amp;gt; base_type;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static typename base_type::x_type x;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static typename base_type::y_type y;
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static const std::size_t size = sizeof (
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type_deduction_detail::test&amp;lt;
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typename base_type::x_type
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , typename base_type::y_type
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;(x + y) &amp;nbsp; &amp;nbsp; // Use x+y to stand of all the arithmetic 
&lt;br&gt;&amp;gt; actions
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static const std::size_t index = (size / sizeof (char)) - 1;
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename mpl::at_c&amp;lt;
&lt;br&gt;&amp;gt; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typename base_type::types, index&amp;gt;::type id;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename id::type promote_type;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typeof (X() + Y()) promote_type;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef BOOST_TYPEOF (X() + Y()) promote_type;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;This sounds very useful. The provided return type deduction was only
&lt;br&gt;introduced because BOOST_TYPEOF was not available at this time.
&lt;br&gt;&lt;br&gt;mfg
&lt;br&gt;Gunter
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25825535&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25825535&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Proposed-change%3A-use-BOOST_TYPEOF-tp25820792p25825535.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25823433</id>
	<title>Re: enable complex @ int</title>
	<published>2009-10-09T08:42:59Z</published>
	<updated>2009-10-09T08:42:59Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">Patch to add tests:
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[test11.cpp.diff]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;diff -r dcee1338df33 libs/numeric/ublas/test/test11.cpp
&lt;br&gt;--- a/libs/numeric/ublas/test/test11.cpp	Tue Sep 29 15:01:07 2009 -0400
&lt;br&gt;+++ b/libs/numeric/ublas/test/test11.cpp	Fri Oct 09 11:41:57 2009 -0400
&lt;br&gt;@@ -92,7 +92,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v2 = v1 * value_type (1.);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 * 1. = &amp;quot; &amp;lt;&amp;lt; v2 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v2 = v1 * t;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 * N = &amp;quot; &amp;lt;&amp;lt; v2 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 * value_type(N) = &amp;quot; &amp;lt;&amp;lt; v2 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;+	// test interop with integer
&lt;br&gt;+	v2 = v1 * N;
&lt;br&gt;+	std::cout &amp;lt;&amp;lt; &amp;quot;v1 * N = &amp;quot; &amp;lt;&amp;lt; v2 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Some assignments
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;initialize_vector (v1);
&lt;br&gt;@@ -108,6 +111,9 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v1 *= value_type (1.);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 *= 1. = &amp;quot; &amp;lt;&amp;lt; v1 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v1 *= t;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 *= value_type(N) = &amp;quot; &amp;lt;&amp;lt; v1 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;+	// test interop with integer
&lt;br&gt;+	v1 *= N;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; &amp;quot;v1 *= N = &amp;quot; &amp;lt;&amp;lt; v1 &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Unary vector operations resulting in a scalar
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25823433&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25823433&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/enable-complex-%40-int-tp25507164p25823433.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25820792</id>
	<title>Proposed change: use BOOST_TYPEOF</title>
	<published>2009-10-09T05:59:51Z</published>
	<updated>2009-10-09T05:59:51Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">Since we have BOOST_TYPEOF, use it in type_traits.hpp:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; template&amp;lt;class X, class Y&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct promote_traits {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef type_deduction_detail::base_result_of&amp;lt;X, Y&amp;gt; base_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static typename base_type::x_type x;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static typename base_type::y_type y;
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static const std::size_t size = sizeof (
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type_deduction_detail::test&amp;lt;
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typename base_type::x_type
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , typename base_type::y_type
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;(x + y) &amp;nbsp; &amp;nbsp; // Use x+y to stand of all the arithmetic 
&lt;br&gt;actions
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static const std::size_t index = (size / sizeof (char)) - 1;
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typedef typename mpl::at_c&amp;lt;
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; typename base_type::types, index&amp;gt;::type id;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename id::type promote_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typeof (X() + Y()) promote_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typedef BOOST_TYPEOF (X() + Y()) promote_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25820792&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25820792&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Proposed-change%3A-use-BOOST_TYPEOF-tp25820792p25820792.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25820652</id>
	<title>Re: enable complex @ int</title>
	<published>2009-10-09T05:51:43Z</published>
	<updated>2009-10-09T05:51:43Z</updated>
	<author>
		<name>Neal Becker</name>
	</author>
	<content type="html">Attached is the complete patch. &amp;nbsp;Acceptable?&lt;br /&gt;&lt;tt&gt;[traits.diff]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;diff -r dcee1338df33 boost/numeric/ublas/traits.hpp
&lt;br&gt;--- a/boost/numeric/ublas/traits.hpp	Tue Sep 29 15:01:07 2009 -0400
&lt;br&gt;+++ b/boost/numeric/ublas/traits.hpp	Fri Oct 09 08:50:15 2009 -0400
&lt;br&gt;@@ -26,6 +26,8 @@
&lt;br&gt;&amp;nbsp;#include &amp;lt;boost/typeof/typeof.hpp&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;boost/utility/enable_if.hpp&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;boost/type_traits/is_float.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/type_traits/is_integral.hpp&amp;gt;
&lt;br&gt;+#include &amp;lt;boost/mpl/and.hpp&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// anonymous namespace to avoid ADL issues
&lt;br&gt;&amp;nbsp;namespace {
&lt;br&gt;@@ -43,43 +45,83 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;namespace boost { namespace numeric { namespace ublas {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt; 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (int in1, std::complex&amp;lt;R&amp;gt; const&amp; in2 ) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2 ) {
&lt;br&gt;&amp;nbsp;	return R (in1) + in2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (std::complex&amp;lt;R&amp;gt; const&amp; in1, int in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator+ (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;&amp;nbsp;	return in1 + R (in2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type &amp;nbsp;inline operator- (int in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator- (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;&amp;nbsp;	return R (in1) - in2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type &amp;nbsp;inline operator- (std::complex&amp;lt;R&amp;gt; const&amp; in1, int in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator- (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;&amp;nbsp;	return in1 - R (in2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type &amp;nbsp;inline operator* (int in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator* (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;&amp;nbsp;	return R (in1) * in2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator* (std::complex&amp;lt;R&amp;gt; const&amp; in1, int in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator* (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;&amp;nbsp;	return in1 * R(in2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type &amp;nbsp;inline operator/ (int in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator/ (I in1, std::complex&amp;lt;R&amp;gt; const&amp; in2) {
&lt;br&gt;&amp;nbsp;	return R(in1) / in2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R&amp;gt;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;boost::is_float&amp;lt;R&amp;gt;, std::complex&amp;lt;R&amp;gt; &amp;gt;::type &amp;nbsp;inline operator/ (std::complex&amp;lt;R&amp;gt; const&amp; in1, int in2) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename R, typename I&amp;gt; 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename boost::enable_if&amp;lt;
&lt;br&gt;+	mpl::and_&amp;lt;
&lt;br&gt;+	 &amp;nbsp;boost::is_float&amp;lt;R&amp;gt;,
&lt;br&gt;+	 &amp;nbsp;boost::is_integral&amp;lt;I&amp;gt;
&lt;br&gt;+	 &amp;nbsp;&amp;gt;,
&lt;br&gt;+	std::complex&amp;lt;R&amp;gt; &amp;gt;::type inline operator/ (std::complex&amp;lt;R&amp;gt; const&amp; in1, I in2) {
&lt;br&gt;&amp;nbsp;	return in1 / R (in2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25820652&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25820652&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/enable-complex-%40-int-tp25507164p25820652.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25819778</id>
	<title>Re: Problems with identity_matrix&lt;&gt; / lu_substitute()</title>
	<published>2009-10-09T04:52:39Z</published>
	<updated>2009-10-09T04:52:39Z</updated>
	<author>
		<name>Marco Guazzone</name>
	</author>
	<content type="html">On Fri, Oct 9, 2009 at 12:58 PM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25819778&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pietro.Mele@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Marco,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; with the vector instead of the matrix it works correctly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thank you,
&lt;br&gt;&amp;gt; Pietro
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;There is a case in which you have to pass a matrix to lu_substitute
&lt;br&gt;(instead of a vector); this is for matrix inversion.
&lt;br&gt;&lt;br&gt;If you need to compute the matrix inverse, take a look at
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion&lt;/a&gt;&lt;br&gt;&lt;br&gt;or in your boost distribution at:
&lt;br&gt;&lt;br&gt;&amp;lt;boost-home&amp;gt;/libs/numeric/ublas/test/test_lu.cpp
&lt;br&gt;&lt;br&gt;&lt;br&gt;Ciao!!
&lt;br&gt;&lt;br&gt;-- Marco
&lt;br&gt;_______________________________________________
&lt;br&gt;ublas mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25819778&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ublas@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.boost.org/mailman/listinfo.cgi/ublas&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.boost.org/mailman/listinfo.cgi/ublas&lt;/a&gt;&lt;br&gt;Sent to: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25819778&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-identity_matrix%3C%3E---lu_substitute%28%29-tp25808915p25819778.html" />
</entry>

</feed>
