Boost logo

Boost :

From: boost (boost_at_[hidden])
Date: 2001-06-08 15:52:17


Salut,

On Thursday 07 June 2001 21:50, you wrote:
> One thing that we need to decide on is the interface for traversing
> vectors and matrices. I see a couple options:
>
> 1. MTL-style iterators
>
> *i // return a matrix/vector element
> i.index() // return the index of the element pointed to (for vectors)
> i.row() // return the row index (for matrices)
> i.colummn() // return the column indexn (for matrices)
>
> 2. iterator over "matrix elements" or "vector elements"
> *i // returns a matrix or vector element object.
> value(*i) // return the element value
> row(*i) // returns the row index
> column(*i) // return the column index
> index(*i) // return the index (for vectors)
>

SInce I have to dealt with matrices of matrices, I'd prefer
the first one. So I could introduce a super-iterator with
 i.index().index(), which would be consistent with 1).

index( index( *i) ) wouldn't be as good to read.

Best wishes,
Peter


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk