Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-03-22 03:51:23


On Tuesday 21 March 2006 23:55, Sohail Somani wrote:
> Hi list,
>
> Is there a way to reindex the bases used in ublas matrices and vectors
> as is done with multi_array?
>
> For example, I'd like to index a NxN matrix (0..N-1,0..N-1 in ublas) as
> (1..N,1..N).

You can choose any index base for sparse matrices and vectors (template
parameter IB). If you want to use other index bases for dense matrices you
can subclass matrix and replace the operator()(i,j). Currently, there is no
support for general index bases for dense matrix types.

mfg
Gunter