On Mon, 8 May 2023, Sven Schreiber wrote:
nullspace_normalize function in plugin/jrestrict.c. If the latter is specific to cointegration stuff, I think it would be good if the function name reflected that. If, OTOH, it's a general algebra function, maybe it should also live in lib/src/gretl_matrix.c, and its relationship with the former function should be clarified.
It is specific to cointegration stuff (actually: to the special case when restrictions involve the loading matrix alpha), so I'd leave it where it is. As for the idea of renaming it, I don't see a pressing case: after all, it's marked static and it's not going to pollute any namespace outside that context, where its purpose is rather clear. But if we were to choose a more informative name, do you have suggestions?
Well, without studying exactly what the function does it's not so easy to come up with a name, but if it's specific to cointegration, for example a prefix like "coint_" or suffix like "_jbeta" or similar could be an idea. It's not about namespace pollution, but about general transparency and legibility. I was grepping the source, and then you see "normalize_nullspace" as well as "nullspace_normalize", so you ask yourself what's going on there.
thanks
sven