mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-09 11:32:19 +00:00
add new constructor from vector to permutation matrix
svn path=/trunk/boost/numeric/ublas/; revision=51741
This commit is contained in:
@@ -32,12 +32,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user