mtl::matrix::recursator< Matrix > Struct Template Reference

#include <matrix_recursator.hpp>

Collaboration diagram for mtl::matrix::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<typename Matrix>
struct mtl::matrix::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<typename Matrix>
mtl::matrix::recursator< Matrix >::recursator ( Matrix const &  matrix,
size_type  bound = 0 
) [inline, explicit]

Construct a recursator from a matrix.

Parameters:
matrix The matrix to which the recursator refers.
bound Explicit 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<typename Matrix>
void mtl::matrix::recursator< Matrix >::set_bound ( size_type  b  )  [inline]

Set the bound of the recursator.

Parameters:
bound The 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::recursator< Matrix > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Generated on 19 May 2009 by Doxygen 1.5.5 -- Copyright 2007 by the Trustees of Indiana University.