-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Important invariant removed by assert #32
Comments
It appears that those assertions have been there since the beginning. Let me not speak for @tugluk, but I'd guess that they're just sanity checks. There isn't any mathematical reason we shouldn't allow a zero I misspoke earlier today – the structured code doesn't use an iterative linear solver, so the decomposition and recomposition routines should be 'exact' inverses. It would be a good test to have. |
@tugluk's comments on #31 and #33 made me realize I wasn't considering the quantizer at all. Without digging into the code, here's roughly what I think's going on:
If we want to allow a zero |
@ben-e-whitney, this is bang on. This is basically what I have in the code, L^infinity is a little different but the idea is the same. Your suggestion is sure to work (obviously) with a loss in compression, using long ints in the quantizer is also an immediate intermediate solution of sorts. |
The reimplemented |
If we were allowed to pass a zero tolerance to
mgard_compress
, then a very powerful unit test would be available.However, this is removed by
mgard_api.cpp
, line 19, whichassert
s thattol >= 1e-8
.Is there a fundamental reason for this restriction? Note that if I remove it and set
tol =0
, then all returned data decompresses to zero. Is this expected behavior?The text was updated successfully, but these errors were encountered: