-1
$\begingroup$

I have to solve a linear equation system, Ax=b, where A is a (very) large sparse matrix (compressed sparse column form).

From what I've read I think I'm supposed to use Givens method, but I don't know how since A is too big to be stored in memory and all I have are the three vectors (rows, columns and values).

I don't want to use a built-in Matlab function.

$\endgroup$
0
$\begingroup$

You can use many methods to solve the system and can find a nice introduction about it here.

For systems too large to fit in memory, the trick is replacing $\mathbf{Ax}$ with $\operatorname{f}(\mathbf{x})$, where $\operatorname{f}$ is a function pointer that will return the matrix-vector product. Of course there is work to be done on your part to write the function, but that's really all there is to it

$\endgroup$
0
$\begingroup$

For very large systems, I would suggest that you use some ready-to-use product, since development of such program takes significant time and effort.

In order to store such matrix, you will need to use some scheme like the linked list (or a similar one, so-called "adjacency structure", which is broadly used for storing graphs). Ideally, the matrix storage should be hidden inside the solver, and the elements of the matrix are passed into the solver one-by-one. Good solvers include such function, and the user just needs to call that function, with the row and column indexes and the value of the element itself. When the complete matrix is internally stored, the user calls another function, into which the system right-hand side is passed, and the solution vector is returned upon completion of the solution process.

Below is a reference to one of such solvers, which is capable of solving sparse systems containing millions of equations on just an ordinary PC: http://members.ozemail.com.au/~comecau/CMA_Sparse.htm

$\endgroup$
  • $\begingroup$ While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review $\endgroup$ – choco_addicted Apr 13 '16 at 10:18
  • $\begingroup$ Thank you for your remark; I have expanded the reply. $\endgroup$ – SparseSolverCodes Apr 13 '16 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.