Logo MTL4
Public Member Functions | Protected Attributes
mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix > Struct Template Reference

#include <matrix_recursator.hpp>

Collaboration diagram for mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 recursator (Matrix const &matrix, size_type bound=0)
sub_matrix_type operator* () const
 Compute the sub-matrix corresponding to this recursator.
size_type bound () const
 Return the bound of the recursator.
void set_bound (size_type b)

Protected Attributes

size_type my_bound
 Referred matrix (from which the sub-matrices are built)
size_type my_first_row
 Virtual matrix size, i.e. upper bound for size of sub-matrix.
size_type my_first_col
 Row of first entry in submatrix.

Detailed Description

template<class T, class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix>
struct mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix >

Class for matrix recursator

How to use this class is described in the recursion introduction.

See also:
mtl::north_west, mtl::north_east, mtl::south_west, mtl::south_east, mtl::is_empty(const recursator<Matrix>&), mtl::is_full(const recursator<Matrix>&), mtl::num_rows(const recursator<Matrix>&), mtl::num_cols(const recursator<Matrix>&), mtl::size(const recursator<Matrix>&)

Constructor & Destructor Documentation

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix >
mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix >::recursator ( Matrix const &  matrix,
size_type  bound = 0 
) [inline, explicit]

Construct a recursator from a matrix.

Parameters:
matrixThe matrix to which the recursator refers.
boundExplicit bound declaration; must not be smaller than the numbers of rows and the number of columns; must also be a power of 2.

Constructor takes the entire matrix as sub-matrix. This allows to have different type for the matrix and the sub-matrix.


Member Function Documentation

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix >
void mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix >::set_bound ( size_type  b) [inline]

Set the bound of the recursator.

Parameters:
boundThe new virtual bound; must be a power of 2.

This function allows to declare a virtual bound smaller than the number of rows and/or columns. It must be used with uttermost care.


The documentation for this struct was generated from the following file:


mtl::matrix< T, Shape, Storage, Orientation >::recursator< Matrix > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Gen. with rev. 7542 on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.