
Boost : 
From: jhrwalter (walter_at_[hidden])
Date: 20020124 05:40:37
 In boost_at_y..., Jeremy Siek <jsiek_at_c...> wrote:
>
> It is not important for the matrix dimension functions and the
> multidimensional array dimension functions to have the same names,
because
> they are different abstractions. There have been many posts in the
past,
> by myself and other, about why matricies and arrays, though
agonizingly
> similar in representation, and really very different entities
> mathematically, and should be treated differently in software (with
which
> we hope to model the mathematics).
May be that's correct for matrices and multidimensional arrays. But
I'm not sure, if the same holds for matrices and tensors.
> If you think of a matrix as a linear operator (which I hope is what
we are
> aiming for with a linear algebra library), the number of columns is
the
> dimension of the range, and the number of rows is the dimension of
the
> domain. Half jokingly, I think domain_size() and range_size() would
be
> better names than number of rows and columns.
Interesting idea, but I'm not sure, if this is ok for left
multiplication with a vector.
> However, the common usage is
> the field is "number of rows" and "number of columns". If you don't
name
> the functions accordingly, you'll be forever answering emails about
what
> "size1" means.
Good point.
It seems to me, that the intermediate results of our (inofficial)
poll are:
nrows/ncols: 2
size1/size2: ?
So let me ask the question the other way round: are there any
objections, if we rename size1()/size2() to row_count()/column_count
(), index1()/index2() to row_index()/column_index() and iterator1
()/iterator2() to row_iterator()/column_iterator()?
Regards
Joerg
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk