Results 1 to 5 of 5
  1. #1
    GregXel is offline Member
    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Default Solving linear equation systems including sparse matrices

    Hi everyone,

    Working on a Java project, I face the following problem:

    I would like to solve a linear equation system of the form

    A * x = b.

    Therein, the matrix A and both vectors x and b contain several thousand array elements. A, however, is a sparse matrix and only a small number of diagonals of A may contain values that differ from zero.

    The use of Java standard solvers results in very long computation times as these solvers normally do not use the specific properties of sparse matrices. Therefore I would like to ask if someone knows packages that include linear equation solvers which are able to solve systems as described above in a reasonable time.

    I would be very grateful for any hint.

    Thanks a lot in advance and best regards

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,571
    Blog Entries
    7
    Rep Power
    21

    Default Re: Solving linear equation systems including sparse matrices

    Perform a LUP decomposition on A, i.e. L*U == P*A --> L*U*b == P*A*b --> Pt*L*U*b is what you're looking for (Pt is the transposed of row permutation matrix P). Lef multiplying by U is A simple backward substitution and multiplying b L is a forward substitution. If A is sparse then both L and U are also sparse. Matrix P can be stored as a single one dimensional array of index values. Google is your friend here.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: Solving linear equation systems including sparse matrices


  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default Re: Solving linear equation systems including sparse matrices

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,571
    Blog Entries
    7
    Rep Power
    21

    Default Re: Solving linear equation systems including sparse matrices

    Too bad about all those cross postings because keeping those L and U matrixes sparse is an interesting problem ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Arrays and Matrices
    By Shaeman111 in forum New To Java
    Replies: 2
    Last Post: 11-10-2012, 07:24 AM
  2. Replies: 5
    Last Post: 01-23-2012, 08:30 PM
  3. Sparse matrix in java
    By Zerpol in forum New To Java
    Replies: 2
    Last Post: 12-15-2010, 12:35 PM
  4. linear systems of equations
    By tyang in forum New To Java
    Replies: 2
    Last Post: 03-24-2010, 03:13 PM
  5. implementing sparse and nonsparse matrices together
    By ishakteyran in forum New To Java
    Replies: 0
    Last Post: 12-07-2007, 08:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •