"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/armadillo_bits/Cube_meat.hpp" between
armadillo-10.8.2.tar.xz and armadillo-11.0.0.tar.xz

About: Armadillo is a C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use.

Cube_meat.hpp  (armadillo-10.8.2.tar.xz):Cube_meat.hpp  (armadillo-11.0.0.tar.xz)
skipping to change at line 3148 skipping to change at line 3148
(in_row >= n_rows) || (in_row >= n_rows) ||
(in_col >= n_cols) || (in_col >= n_cols) ||
(in_slice >= n_slices) (in_slice >= n_slices)
, ,
"Cube::operator(): index out of bounds" "Cube::operator(): index out of bounds"
); );
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row]; return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];
} }
#if defined(__cpp_multidimensional_subscript)
//! element accessor; no bounds check
template<typename eT>
arma_inline
arma_warn_unused
eT&
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_s
lice)
{
return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] );
}
//! element accessor; no bounds check
template<typename eT>
arma_inline
arma_warn_unused
const eT&
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_s
lice) const
{
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];
}
#endif
//! element accessor; no bounds check //! element accessor; no bounds check
template<typename eT> template<typename eT>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
eT& eT&
Cube<eT>::at(const uword in_row, const uword in_col, const uword in_slice) Cube<eT>::at(const uword in_row, const uword in_col, const uword in_slice)
{ {
return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] ); return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] );
} }
skipping to change at line 3216 skipping to change at line 3240
//! returns true if all of the elements are finite //! returns true if all of the elements are finite
template<typename eT> template<typename eT>
inline inline
arma_warn_unused arma_warn_unused
bool bool
Cube<eT>::is_finite() const Cube<eT>::is_finite() const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return arrayops::is_finite( memptr(), n_elem ); return arrayops::is_finite(memptr(), n_elem);
} }
//! returns true if the cube has no elements //! returns true if the cube has no elements
template<typename eT> template<typename eT>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
bool bool
Cube<eT>::is_empty() const Cube<eT>::is_empty() const
{ {
return (n_elem == 0); return (n_elem == 0);
} }
template<typename eT> template<typename eT>
inline inline
arma_warn_unused arma_warn_unused
bool bool
Cube<eT>::has_inf() const Cube<eT>::has_inf() const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return arrayops::has_inf( memptr(), n_elem ); return arrayops::has_inf(memptr(), n_elem);
} }
template<typename eT> template<typename eT>
inline inline
arma_warn_unused arma_warn_unused
bool bool
Cube<eT>::has_nan() const Cube<eT>::has_nan() const
{ {
arma_extra_debug_sigprint(); arma_extra_debug_sigprint();
return arrayops::has_nan( memptr(), n_elem ); return arrayops::has_nan(memptr(), n_elem);
}
template<typename eT>
inline
arma_warn_unused
bool
Cube<eT>::has_nonfinite() const
{
arma_extra_debug_sigprint();
return (arrayops::is_finite(memptr(), n_elem) == false);
} }
//! returns true if the given index is currently in range //! returns true if the given index is currently in range
template<typename eT> template<typename eT>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
bool bool
Cube<eT>::in_range(const uword i) const Cube<eT>::in_range(const uword i) const
{ {
return (i < n_elem); return (i < n_elem);
skipping to change at line 4890 skipping to change at line 4925
arma_inline arma_inline
arma_warn_unused arma_warn_unused
const eT& const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const u word i) const Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const u word i) const
{ {
arma_debug_check_bounds( (i >= fixed_n_elem), "Cube::operator(): index out of bounds" ); arma_debug_check_bounds( (i >= fixed_n_elem), "Cube::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[i] : mem_local[i]; return (use_extra) ? mem_local_extra[i] : mem_local[i];
} }
#if defined(__cpp_multidimensional_subscript)
template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator[] (const
uword in_row, const uword in_col, const uword in_slice)
{
const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row;
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator[] (const
uword in_row, const uword in_col, const uword in_slice) const
{
const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row;
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
#endif
template<typename eT> template<typename eT>
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices> template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline arma_inline
arma_warn_unused arma_warn_unused
eT& eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::at(const uword in_r ow, const uword in_col, const uword in_slice) Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::at(const uword in_r ow, const uword in_col, const uword in_slice)
{ {
const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row; const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row;
return (use_extra) ? mem_local_extra[i] : mem_local[i]; return (use_extra) ? mem_local_extra[i] : mem_local[i];
skipping to change at line 5210 skipping to change at line 5273
for(uword slice = 0; slice < local_n_slices; ++slice) for(uword slice = 0; slice < local_n_slices; ++slice)
for(uword col = 0; col < local_n_cols; ++col ) for(uword col = 0; col < local_n_cols; ++col )
for(uword row = 0; row < local_n_rows; ++row ) for(uword row = 0; row < local_n_rows; ++row )
{ {
(*out_mem) = std::complex<T>( (*out_mem).real(), P.at(row,col,slice) ); (*out_mem) = std::complex<T>( (*out_mem).real(), P.at(row,col,slice) );
out_mem++; out_mem++;
} }
} }
} }
#ifdef ARMA_EXTRA_CUBE_MEAT #if defined(ARMA_EXTRA_CUBE_MEAT)
#include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_MEAT) #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_MEAT)
#endif #endif
//! @} //! @}
 End of changes. 6 change blocks. 
4 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)