SpCol_meat.hpp | SpCol_meat.hpp | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
SpCol<eT>::SpCol() | SpCol<eT>::SpCol() | |||
: SpMat<eT>(0, 1) | : SpMat<eT>(0, 1) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
access::rw(SpMat<eT>::vec_state) = 1; | access::rw(SpMat<eT>::vec_state) = 1; | |||
} | } | |||
//! construct a column vector with the specified number of n_elem | //! construct a column vector with the specified number of elements | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
SpCol<eT>::SpCol(const uword in_n_elem) | SpCol<eT>::SpCol(const uword in_n_elem) | |||
: SpMat<eT>(in_n_elem, 1) | : SpMat<eT>(in_n_elem, 1) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
access::rw(SpMat<eT>::vec_state) = 1; | access::rw(SpMat<eT>::vec_state) = 1; | |||
} | } | |||
skipping to change at line 307 | skipping to change at line 307 | |||
*/ | */ | |||
//! remove specified row | //! remove specified row | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
void | void | |||
SpCol<eT>::shed_row(const uword row_num) | SpCol<eT>::shed_row(const uword row_num) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
arma_debug_check( row_num >= SpMat<eT>::n_rows, "Col::shed_row(): out of bounds"); | arma_debug_check( row_num >= SpMat<eT>::n_rows, "SpCol::shed_row(): out o f bounds"); | |||
shed_rows(row_num, row_num); | shed_rows(row_num, row_num); | |||
} | } | |||
//! remove specified rows | //! remove specified rows | |||
template<typename eT> | template<typename eT> | |||
inline | inline | |||
void | void | |||
SpCol<eT>::shed_rows(const uword in_row1, const uword in_row2) | SpCol<eT>::shed_rows(const uword in_row1, const uword in_row2) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
arma_debug_check | arma_debug_check | |||
( | ( | |||
(in_row1 > in_row2) || (in_row2 >= SpMat<eT>::n_rows), | (in_row1 > in_row2) || (in_row2 >= SpMat<eT>::n_rows), | |||
"Col::shed_rows(): indices out of bounds or incorrectly used" | "SpCol::shed_rows(): indices out of bounds or incorrectly used" | |||
); | ); | |||
const uword diff = (in_row2 - in_row1 + 1); | const uword diff = (in_row2 - in_row1 + 1); | |||
// This is easy because everything is in one column. | // This is easy because everything is in one column. | |||
uword start = 0, end = 0; | uword start = 0, end = 0; | |||
bool start_found = false, end_found = false; | bool start_found = false, end_found = false; | |||
for(uword i = 0; i < SpMat<eT>::n_nonzero; ++i) | for(uword i = 0; i < SpMat<eT>::n_nonzero; ++i) | |||
{ | { | |||
// Start position found? | // Start position found? | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
SpMat_meat.hpp | SpMat_meat.hpp | |||
---|---|---|---|---|
skipping to change at line 3602 | skipping to change at line 3602 | |||
"SpMat::init(): object is a row or column vector; requested size is not compatible" | "SpMat::init(): object is a row or column vector; requested size is not compatible" | |||
); | ); | |||
} | } | |||
} | } | |||
// Ensure that n_elem can hold the result of (n_rows * n_cols) | // Ensure that n_elem can hold the result of (n_rows * n_cols) | |||
arma_debug_check | arma_debug_check | |||
( | ( | |||
( | ( | |||
( (in_rows > ARMA_MAX_UHWORD) || (in_cols > ARMA_MAX_UHWORD) ) | ( (in_rows > ARMA_MAX_UHWORD) || (in_cols > ARMA_MAX_UHWORD) ) | |||
? ( (float(in_rows) * float(in_cols)) > float(ARMA_MAX_UHWORD) ) | ? ( (float(in_rows) * float(in_cols)) > float(ARMA_MAX_UWORD) ) | |||
: false | : false | |||
), | ), | |||
"SpMat::init(): requested size is too large" | "SpMat::init(): requested size is too large" | |||
); | ); | |||
// Clean out the existing memory. | // Clean out the existing memory. | |||
if (values) | if (values) | |||
{ | { | |||
memory::release(values); | memory::release(values); | |||
memory::release(row_indices); | memory::release(row_indices); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
arma_version.hpp | arma_version.hpp | |||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
// | // | |||
// This Source Code Form is subject to the terms of the Mozilla Public | // This Source Code Form is subject to the terms of the Mozilla Public | |||
// License, v. 2.0. If a copy of the MPL was not distributed with this | // License, v. 2.0. If a copy of the MPL was not distributed with this | |||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | // file, You can obtain one at http://mozilla.org/MPL/2.0/. | |||
//! \addtogroup arma_version | //! \addtogroup arma_version | |||
//! @{ | //! @{ | |||
#define ARMA_VERSION_MAJOR 3 | #define ARMA_VERSION_MAJOR 3 | |||
#define ARMA_VERSION_MINOR 810 | #define ARMA_VERSION_MINOR 810 | |||
#define ARMA_VERSION_PATCH 1 | #define ARMA_VERSION_PATCH 2 | |||
#define ARMA_VERSION_NAME "Newell Highway" | #define ARMA_VERSION_NAME "Newell Highway" | |||
struct arma_version | struct arma_version | |||
{ | { | |||
static const unsigned int major = ARMA_VERSION_MAJOR; | static const unsigned int major = ARMA_VERSION_MAJOR; | |||
static const unsigned int minor = ARMA_VERSION_MINOR; | static const unsigned int minor = ARMA_VERSION_MINOR; | |||
static const unsigned int patch = ARMA_VERSION_PATCH; | static const unsigned int patch = ARMA_VERSION_PATCH; | |||
static | static | |||
inline | inline | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||