David,
I would love to have operators acting as you propose. I am afraid though that we will not be able to overload them, since their operation on primitives supersedes other overloads. I was thinking of ways of overcoming that, or using  other operators, but I am relatively pessimistic on whether this can happen in a sound way.
If you spot something in http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B, I will give it a shot.

> I will need some examples to write the documentation to all of that too and include it with the one I'm writing right now.
After work today I will post examples showing the interface for people to comment on. I suppose after this cycle there will be a final version for examples to be included in the documentation.

Best
Nasos




Date: Mon, 29 Mar 2010 09:38:07 +0200
From: david.bellot@gmail.com
To: ublas@lists.boost.org
Subject: Re: [ublas] Assignement operation proposal.

Hi Nasos,

the implementation looks very promising. A few quick thoughts before going to work today:

> "automatic" choice seems to be dangerous to me.)

it is kind of dangerous but this is what most of the people expect. Maybe another "marker" could help but it means overloading 2 operators, like for example mat << 1 ,2 ,3 % 12,14,16 % 33,44,55;  So that the code will not be too much verbose.
If I remember the operator & is used in LateX to separate lines in array ? (don't remember exactly). But that would be a "common" sign for users. I'm always in favour of simple writings when developing numerical code.
That's all cosmetic of course: you can even think about wrting stuffs like
mat =
1 | 2 | 3 ||
6 | 5 | 4 ||
7 | 8 | 9;



> - Where do you think this should be added? As a separate header file, or included in vector_ and matrix_ expression headers?

Better to have this function attached directly to vector_ and matrix_. One thinks about its immediate availability when programming.

I will need some examples to write the documentation to all of that too and include it with the one I'm writing right now.
Anyway, that all sounds very good and nice.
Thanks.

David

--
David Bellot, PhD
david.bellot@gmail.com
http://david.bellot.free.fr



Hotmail: Trusted email with powerful SPAM protection. Sign up now.