Indexer Programmers Guide Contents | Index |  Search

Category:utilities Component type:concept
Description

The utility concept is in charge of mapping indices from normal Matrix coordinates into the TwoD coordinate system. Here is an example of such a mapping for a banded matrix.

```          [ 1  2  3    ]
Matrix = [    4  5  6 ]
[       7  8 ]
```

The element whose value is 4 is at (1,1) in Matrix coordinates. The TwoD mapping of this matrix would look as follows.

```        [ 1  2  3 ]
TwoD = [ 4  5  6 ]
[ 7  8 ]
```

In TwoD coordinates the 4 is at (1,0).

There are three models of the Indexer concept, and each one provides a different mapping. There is the rect_indexer, the banded_indexer, and the diagonal_indexer. Used in oned_part, inside its iterators Called from by matrix_implementation::operator()(i,j) Called from by matrix_implementation::operator()(i,j)

Refinement of
Associated types
Concept Type name Description
size_type X::M
size_type X::N
Dimension X::dim_type
Dimension X::dyn_dim
Dimension X::band_type
Tag X::orientation See matrix_traits
Tag X::shape See matrix_traits
Indexer X::transpose_type
Indexer X::strided_type
OneDIndexer X::oned_indexer
Orienter X::orienter
Notations
Definitions
Expression semantics
Description Expression Semantics
Default Constructor X() or X A;
Construct from Matrix dimension X(dim) or X A(dim)
Construct from Matrix dimension and bandwidth X(dim, bw) or X A(dim, bw)
Copy Constructor X(x) or X A(x)
Constructor from other Indexer X(x) or X A(x)
Construct a OneDIndexer x.deref(i)
Map the point from Matrix coordinates to TwoD coordinates x.at(p)
Map the point from Matrix coordinates to TwoD coordinates x.at(p)
Calculate the dimension that the TwoD container should have X::twod_dim(dim)
Calculate the bandwith that the TwoD container should have X::twod_band(dim)
Number of rows x.nrows()
Number of columns x.ncols()
Bandwidth sub x.sub()
Bandwidth super x.super()
Function specification
Name Function Complexity
Invariants
Models
Notes