Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-06-07 14:50:29

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)

Also, there is the question of whether the above iterator interfaces
should apply to both sparse and dense, or whether the dense iterators
would just use the normal STL style iterators which would leave the
indices out of the picture (for dense iterators they can be obtained in
other ways).

Comments, suggestions?


 Jeremy Siek www:
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185

Boost list run by bdawes at, gregod at, cpdaniel at, john at