sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Sofa.LinearAlgebra] Compressed property in CRS matrix depends on tmp vector

Open alxbilger opened this issue 3 years ago • 7 comments

A CompressedRowSparseMatrix is compressed if the temporary vector of triplets has been converted into the compressed format. Therefore, the boolean compressed must be set depending on the size of the temporary vector, not the size of the compressed values.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

alxbilger avatar Apr 22 '22 10:04 alxbilger

[ci-build][with-all-tests]

alxbilger avatar Apr 22 '22 13:04 alxbilger

Last modif and actually first commit of the code was made by @JeremieA, who would be the best reviewer ;)

hugtalbot avatar Apr 23 '22 08:04 hugtalbot

@JeremieA if you have some time to take a look :eyes:

hugtalbot avatar May 02 '22 19:05 hugtalbot

The data compressed has two meanings : does not contains zero and is compressed. Either create two separate data or by-pass compressed

hugtalbot avatar May 04 '22 09:05 hugtalbot

After discussion with @JeremieA, this PR breaks the meaning of the variable compressed. The comment after this variable says true if the additional storage is empty or has been transfered to the compressed data structure. But @JeremieA claims the variable also says if there are zeros in the compressed values.

A suggestion was to use the refactored CompressedRowSparseMatrix class from https://github.com/InSimo/ISSofa, which brings more clarity on the meanings of the variables (among other important things).

alxbilger avatar May 04 '22 14:05 alxbilger

@alxbilger should we make an issue and remove the "to review" flag ?

hugtalbot avatar May 16 '22 09:05 hugtalbot

@hugtalbot The label is actually "postponed". The reason is I'm not convinced that the variable also states that there are zeros in the compressed values. I did not see anything about that property in the code. In any case, I do not need this PR to continue. So it can be closed.

alxbilger avatar May 17 '22 09:05 alxbilger