Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for the best package for sparse matrix multiplication on single core solution.
I am not looking for CUDA, MPI or OpenMP solutions.
My preference for languages in decreasing order : Matlab, Python, C/C++.
Matlab has its own matrix multiplication function which can be used for sparse matrix multiplication. But are there any better package(s) available ?
I have to multiply two large matrices which are in sparse format.
Eg., one matrix is 677000-by-48000 and another is 48000-by-8192. Here, n-by-d means n : # of rows, d : # of columns
I'm no expert for sparse matrices but I do know the renowned 'eigen' C++ library.
They have a tutorial on sparse matrices, reachable from the documentation page.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
So i've been struggling to find code which can solve a set of simultaneous equations and also handle possibilities of Infinite Solutions, i.e. a singular Matrix. From all the sample code Gaussian Elimination in C that i've encountered the problem arises when dividing by zero in one of the steps for row reduction. Surely there must be some numerical ways to counter this problem.
Gaussian elimination[1] does not work on singular matrices. As you noticed numerically this usually leads to devision by zero or some other problem. If you suspect that a the matrix you want to diagonalize might be singular (or numerically close to singular) you should check out Singular Value Decomposition (SVD) which either provides you with the inverse matrix or something close. A nice resource is Numerical Recipes[1] or GSL[2] if you want to look into the how and why.
[1] http://www.haoli.org/nr/bookcpdf.html (Chap. 2.1)
[2] http://www.gnu.org/software/gsl/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a fast and free alternative to MATLAB regarding matrix calculations (inversions, etc).
MATLAB is fast but also expensive.
Besides, as it is an interpreted language, I think there must be libraries for compiled languages which can achieve the same matrix operations faster.
I know Octave but I have heard it is slower than MATLAB...
Does anyone know of something?
Since you tagged your question with C++, I suggest Eigen.
I think that python with some library like SciPy and NumPy can be a good solution. (Python is not a strictly compiled language, but most of the libraries are written in C/C++ and are pretty fast).
I personally use the unofficial OpenGL Math Library GLM. It should have everything you should need.
http://glm.g-truc.net/0.9.5/index.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Like the title says I'm in need of someway to store and compute with Integers in excess of 500,000 digits in C++. The operations that this program needs are: Divide(Integer), add, subtract, and modulus. Does anyone know of a library out there that can help me accomplish this?
GMP is what you want. There is no practical size limit to processing large integers or floating point numbers. GMP is capable of processing billions of digits, so you are well within the realistic range. It is primarily dependent on your system's architecture and available memory limitations.
http://gmplib.org/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for some c/c++ libraries to do fixed point singular value decomposition or eigenvalue decomposition. Do you know any libraries or any pointers to existing codes?
Thanks
There is a good answer to your question in this thread:
Single Value Decomposition implementation C++
Also, #Bathsheba is pointing you to a good resource, in Numerical Recipes. C is free, but C++ is only "available" with the paid version:
C: http://apps.nrbook.com/c/index.html
C++: http://www.nr.com/oldverswitcher.html
Numerical recipes is a good place to start for all this stuff, visit www.nr.com.
It has versions in C and C++ and other languages although an old cat like me sticks to the C versions.
The very well-written book also explains the algorithms in good detail (the authors are 4 Cambridge professors).
You will have to do some tweaking for fixed point; may be as simple as changing the data types.
Worth a look though methinks.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to compute the Moore-Penrose pseudo-inverse of a matrix in C++, can someone point me to a library implementation or a numerical recipe?
Thanks!
You need 'Single Value Decomposition', from which you can find a C implementation here from Numerical Recipes in C.
This other site describes how to use single value decomposition to calculate the pseudo-inverse.