Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-23 08:01:11


> -----Original Message-----
> From: hankel_o_fung_at_[hidden] [mailto:hankel_o_fung_at_[hidden]]
> Sent: Friday, March 23, 2001 6:51 AM
> To: boost_at_[hidden]
> Subject: [boost] Re: matrix library ?
>
>
> --- In boost_at_y..., "Paul A. Bristow" <pbristow_at_h...> wrote:
> > 1 The business of getting numbers from devices or files into
> > suitable structures is messy, tiresome
> > and error prone for starters.
> Well, that's why there's iterator theory.
>
> > 3 The zero or 1 based differences between C and FORTRAN (BLAS) is
> > still a major practical barrier, mainly because it makes everywhere
> > a minefield.
> Agree. In this respect, I like the way how TNT deals with indices:
> round bracketed indices like u(i), P(i,j) imply 1-based indices,
> while u[i] and P[i][j] imply C-styled indices. Such notations are
> very useful, because one doesn't need to check out the definitions
> of the arrays to find out what the index style is. (But I wonder
> if the round bracket notation can be used in an arbitrarily high
> dimension.)
>
> IMHO, it is natural to use both index styles in a single problem,

(!) How does /that/ situation come up?

> and a good array library should support both styles.
> A matrix library, however, can only and should at least support
> the 1-based index, because matrix indices are 1-based in math.

Are you using some subtle semantic distinction between "array" and "matrix"
here?

> Yet, even if the index convention problem is fixed, we still need
> to solve the row-major/column-major problem ...

What problem is that? I thought row-major/column-major was just a
distinction describing underlying storage format, and thus an implementation
detail.

> To detour a little, I think it is very unfortunate that std::vector
> is called a *vector*. Vectors are one dimensional arrays that
> support the operations required by the definition of a vector space.
> Matrices are conceptually retangular arrays that support at least
> several matrix operations. std::vector hardly be called a vector.
> The name "array list" used by the Java folks, although weird, is
> more accurate, but I think the best name to std::vector is simply
> std::array ...
>
> I hope the Boost folks can draw a line between vectors, matrices
> and arrays in their matrix & array library.

What sort of line did you have in mind?


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