Skip to content
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

Error in example: "And here is an example for user-supplied matrix operation class." #60

Closed
linuxfreebird opened this issue Feb 9, 2019 · 1 comment

Comments

@linuxfreebird
Copy link

I tried compiling the last example mentioned in https://spectralib.org/quick-start.html titled "And here is an example for user-supplied matrix operation class." and I discovered there was a type mismatch between the example and the inline method called perform_op in Spectra/MatOp/internal/ArnoldiOp.h. The example uses double* and ArnoldiOp.h uses const double*, so I changed all const double* to double* in ArnoldiOp.h and it compiled and ran correctly. I am unsure which implementations was the author's original intent.

@yixuan
Copy link
Owner

yixuan commented Feb 9, 2019

Hi @linuxfreebird, thanks for pointing out. Your finding is correct, but the problem is actually in the example. The x_in argument should be const double*, since the input is not meant to be modified. The examples are pretty old and I forgot to change accordingly. Now they have been fixed. Thank you.

@yixuan yixuan closed this as completed Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants