Closed sgibb closed 7 years ago
It is a space/computation trade-off. I waste more memory, but you need to do a (short) computation every time the normalised data is accessed. In the grand scheme of things, both gains/losses are negligible here.
Correct, I am thought that computation of xnorm
would be more rare event than data storing and an easier data structure would be beneficial. But as you said it isn't really important here. Feel free to close the issue.
The current implementation of the
QSep
class contains thexnorm
slot. While being small in size (memory usage) its information is IMHO redundant because it could be easily and fast computed byx/diag(x)
, e.g.qsep
could be implemented as follows: