|
Boost : |
From: Jeremy Graham Siek (jsiek_at_[hidden])
Date: 2004-07-05 16:11:39
On Jul 5, 2004, at 11:54 AM, Peter Schmitteckert wrote:
> Salut,
>
> (note that I only use the dense matrices of ublas)
>
> On Mon, 5 Jul 2004, Toon Knapen wrote:
>
>
> > This is just a matter of documentation. AFAIK there is no accepted
> > concept that demands 'num_rows' and 'num_columns'. The '1' and '2'
> refer
> > to the first and second index which is also a nice convention IMO.
>
> I prefer size1 and size2, since it fits to the sheme of having a
> tensor
> structure with a size3.
Mixing up abstractions is not a good idea. Matrices and tensors are
different creatures. True, sometimes it is useful to think of a tensor
as a matrix, and having adaptors or views that allow for this is
a good thing.
The names we use for operations should match
the common terminology from the problem domain. In this case,
the common terminology is rows and columns.
When we create concepts for tensors, we can use size1, etc.
> Columns and Rows can lead to confusion concernig storage layout.
I disagree.
>
>
> > >
> > > * iterator1 and iterator2 should be named column_iterator and
> > > row_iterator or something memnonic.
> > same as above.
>
> same as above.
>
> >
> > >
> > > * prod should be named operator*; this is a linear algebra library
> > > after all.
>
> Mmmh, this open pitfalls concerning A*B*C in performance issues for
> non experts.
No, the right way to handle this is to have the expression template
machinery
identify that a temporary is needed, and create one automatically.
Cheers,
Jeremy
_______________________________________________
Jeremy Siek <jsiek_at_[hidden]>
http://www.osl.iu.edu/~jsiek
Ph.D. Candidate, Indiana University Bloomington
C++ Booster (http://www.boost.org)
_______________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk