Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51741 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2009-03-12 17:35:10


Author: guwi17
Date: 2009-03-12 17:35:10 EDT (Thu, 12 Mar 2009)
New Revision: 51741
URL: http://svn.boost.org/trac/boost/changeset/51741

Log:
add new constructor from vector to permutation matrix

Text files modified:
   trunk/boost/numeric/ublas/lu.hpp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/boost/numeric/ublas/lu.hpp
==============================================================================
--- trunk/boost/numeric/ublas/lu.hpp (original)
+++ trunk/boost/numeric/ublas/lu.hpp 2009-03-12 17:35:10 EDT (Thu, 12 Mar 2009)
@@ -32,12 +32,18 @@
 
         // Construction and destruction
         BOOST_UBLAS_INLINE
+ explicit
         permutation_matrix (size_type size):
             vector<T, A> (size) {
             for (size_type i = 0; i < size; ++ i)
                 (*this) (i) = i;
         }
         BOOST_UBLAS_INLINE
+ explicit
+ permutation_matrix (const vector_type & init)
+ : vector_type(init)
+ { }
+ BOOST_UBLAS_INLINE
         ~permutation_matrix () {}
 
         // Assignment


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk