block
template<class G> inline typename blockArray< Vector<G> >::self block( Vector<G> &X, const typename Vector<G>::size_type &s)
template<class G> inline typename blockArray<const Vector<G> >::self block(const Vector<G> &X, const typename Vector<G>::size_type &s)
template<class G> inline typename blockArray< Matrix<G> >::self block( Matrix<G> &X, const typename Matrix<G>::size_type &s)
template<class G> inline typename blockArray<const Matrix<G> >::self block(const Matrix<G> &X, const typename Matrix<G>::size_type &s)
template<class G> inline typename blockArray< Matrix<G> >::self block( Matrix<G> &X, const typename Matrix<G>::size_type::size_type &m, const typename Matrix<G>::size_type::size_type &n)
template<class G> inline typename blockArray<const Matrix<G> >::self block(const Matrix<G> &X, const typename Matrix<G>::size_type::size_type &m, const typename Matrix<G>::size_type::size_type &n)
template<class G> inline typename blockArray< Matrix<G> >::self block( Matrix<G> &X, const typename Matrix<G>::size_type::size_type &n)
template<class G> inline typename blockArray<const Matrix<G> >::self block(const Matrix<G> &X, const typename Matrix<G>::size_type::size_type &n)
template<int N,class G> inline typename tinyBlockVector< Vector<G>,N>::self block( Vector<G> &X)
template<int N,class G> inline typename tinyBlockVector<const Vector<G>,N>::self block(const Vector<G> &X)
Decomposition in blocks
Parameters
s | Size of each block |
m | Height of each block |
n | Width of each block |
X | The array to decompose |
Returns
An array representing every blocks
Example
DenseVector<int>::self X(9, "0 1 2 3 4 5 6 7 8"); cout << block(X,3)[1] << endl; // [3 4 5] DenseMatrix<int>::self Y(16, "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"); cout << block(Y,2,2)(1,1) << endl; // [10 11; 14 15]