Antares_Simulator
Antares_Simulator copied to clipboard
Reconsider the role of `initLinkArrays()` & private data members
About initLinkArrays() : This function does not do what its name announces. There is Link in the name but it's not about links only, but also clusters. Besides, the name means nothing to me : which Arrays ? Is it really about init ? (not sure) If we want to know what the function does, we must have a look at its body.
I recommend to split it into 2 parts, one for links, one for clusters, and rename this function rearrangeProperties (for instance), because it's it takes existing BC properties and store them in another way.
So a subsequent question arises : why do we still need private member data pClusterWeights and pLinkWeights if they haven't the right shape in the first place ? When we populate them, let's directly populate the new private member data linkIndex_, linkWeight_, ..., and remove initLinkArrays() function.
Originally posted by @guilpier-code in https://github.com/AntaresSimulatorTeam/Antares_Simulator/pull/1358#discussion_r1243526483