[Ktechlab-devel] QMatrix - Random number generation

P Zoltan zoltan.padrah at gmail.com
Mon Jul 6 20:00:46 UTC 2009


On Mon, 06 Jul 2009 16:40:12 +0200, Julian Bäume <julian at svg4all.de> wrote:

> On Sunday 05 July 2009 22:34:53 P Zoltan wrote:
>>   ... and another note on QuickMatrix and QuickVector: the operators
>> defined on these look like a good candidate for sources of bugs. I'd
>> prefer to change the operators to some methods with same functionality  
>> and
>> intiutive names. Opinions?
> Well, IMHO, we should provide both ways and state in the documentation,  
> that
> the overloaded operators are convenient calls to those functions. We  
> shouldn't
> abandon this feature of the C++ language and since the semantics of the  
> calls
> can be made clear to the user of this API, we should provide those  
> methods to
> be used in the code. I'd prefer writing "a*b" instead of "a.multiply(b)".
>

  This looks like a good approach. My problem with the operators is the  
fact that there are are many types present, with more operators, like:

- scalars (double)
- vector
- matrix

  For example, "a*b" could mean multiplication of:
- a vector with a scalar
- a vector with a matrix
- a matrix with another matrix

  Similar for the others, so reading code wich uses operators kinda sucks...


> Just my 2ct
>
> bye then
> julian





More information about the Ktechlab-devel mailing list