McStasMcXtrace / iFit

a simple library to analyze data (with McCode and Phonons/DFT hooks). :warning: this project has been moved to https://gitlab.com/soleil-data-treatment/soleil-software-projects/remote-desktop
http://ifit.mccode.org
Other
5 stars 5 forks source link

iFunc/iData: derive from handle ? #184

Closed farhi closed 4 years ago

farhi commented 5 years ago

This may simplify programming, especially regarding Listeners/Events/ etc. Also adds default disp/display, fields, fieldnames, ... methods.

Requires to modify copyobj, findobj, comparison operators

farhi commented 5 years ago

And we should as well use:

which is now matlab.mixin.SetGet, but still compatible. This brings set/get. Then subsasgn and subsref should call se/get. The hope is that it all gets faster by using native Matlab classes (supposed to be optimised).

farhi commented 5 years ago

Alternatively to hgsetget and mixin.SetGet, a better solution is to use our extended struct class:

farhi commented 5 years ago

The new 'estruct' is a tentative to replace 'iData'. Much more efficient writting, and definitively faster ! Will most certainly replace iData.

iFunc does not need such major rewrite, except copyobj and make sure we really create new objects when needed. Should be rather simple, and an opportunity for a slight code clean-up as well.

farhi commented 4 years ago

Now done with pushing estruct into iData at https://github.com/McStasMcXtrace/iFit/commit/49e84d63789b175266aaaf602f25ce619bc60a1a