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

use Matrix methods in as.matrix #31

Open
goldingn opened this issue Jun 7, 2016 · 1 comment
Open

use Matrix methods in as.matrix #31

goldingn opened this issue Jun 7, 2016 · 1 comment

Comments

@goldingn
Copy link
Owner

goldingn commented Jun 7, 2016

It may be possible to get a speed up from deterministic projections in big landscapes by using sparse matrix classes

For a 3-stage, 2000 patch dispersal model, switching from matrix to Matrix (and adding import & dealing with classes) here doesn't slow down pop:::as.matrix.dynamic() much (7.3s vs 3.9s) and results in much faster multiplications (1.2s vs 5.3s).

This only skips true 0s, so is as accurate as the dense matrix version. If the matrix construction end can be sped up, this may be worthwhile in all dispersal cases.

@goldingn
Copy link
Owner Author

goldingn commented Jun 9, 2016

@skiptonium definitely worth thinking about sparse matrices for dlmpr. should be easy enough to switch over to SpMat class once the whole thing is prototyped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant