mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-22 03:42:19 +00:00
close #3293 (resized identity matrix)
* merged [56163] into release [SVN r56626]
This commit is contained in:
@@ -2466,11 +2466,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
void resize (size_type size, bool preserve = true) {
|
||||
size1_ = size;
|
||||
size2_ = size;
|
||||
size_common_ = ((std::min)(size1_, size2_));
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
void resize (size_type size1, size_type size2, bool /*preserve*/ = true) {
|
||||
size1_ = size1;
|
||||
size2_ = size2;
|
||||
size_common_ = ((std::min)(size1_, size2_));
|
||||
}
|
||||
|
||||
// Element access
|
||||
@@ -2487,6 +2489,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
identity_matrix &operator = (const identity_matrix &m) {
|
||||
size1_ = m.size1_;
|
||||
size2_ = m.size2_;
|
||||
size_common_ = m.size_common_;
|
||||
return *this;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -2501,6 +2504,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
if (this != &m) {
|
||||
std::swap (size1_, m.size1_);
|
||||
std::swap (size2_, m.size2_);
|
||||
std::swap (size_common_, m.size_common_);
|
||||
}
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
|
||||
Reference in New Issue
Block a user