[Kst] Re: branches/work/kst/portto4/kst/src/libkstapp

Barth Netterfield netterfield at astro.utoronto.ca
Mon Mar 21 21:34:05 CET 2011


Very nice.  Commit!

On Mon, Mar 21, 2011 at 4:05 PM, Peter Kümmel <syntheticpp at gmx.net> wrote:
> On 21.03.2011 20:11, Barth Netterfield wrote:
>>
>> Arggg...
>> It is implemented, but doesn't work.
>>
>> Here is why:
>>   The output vectors get stored in a hash.
>>   A Hash's order is undefined.
>>   The names of the output vectors are written in the order of the hash.
>>   The short name numbers are allocated in the order they are created
>>   When creating the plugin in the first case, they are created in some
>> order at the whim of the programmer (eg, in setupOutputs).
>>   When creating the plugin when being loaded from file, they are
>> created in the order they were listed in the file, which is different.
>> Mehem ensues.
>>
>> It is possible that save/load used to work because QHash at one time
>> might have kept the order of creation.  Or maybe it never worked.
>>
>> In any case, we need to fix it:
>> options:
>> a) change from QHash to QMap, and change setupOutputs in all plugins
>> so things are created alphabetically (seems fragile)
>> b) something less fragile that I can't think of off hand.
>>
>> I implemented (a) for unweighted linear fits and it does work.
>>
>
> What about this patch for (b) ? We don't have to touch any plugin code.
>
> Seems to work with the polynominal fit.
>
> Peter
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
>



-- 
C. Barth Netterfield
University of Toronto
416-845-0946


More information about the Kst mailing list