Registered Member
|
My program requires repetitive initialization of the same sparse matrix. What is the best method to reset a sparse matrix in terms of minimizing the leftover memory footprint ? For example, is it a good practice to destroy it, and re-initialize every time?
|
Moderator
|
It's surprising but it's often the fastest approach. Which method do you use to set the nonzero values: setFromTriplets()? or something else?
|
Registered Member
|
My main concern is not the speed, but minimizing the memory leakage. By the way, how can I destroy an Eigen sparse matrix?
I don't set the number of nonzero elements apriori, (would it be better to set it in terms of memory leakage?) Thanks |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]