Results 1 to 5 of 5

Thread: c++ matrix library for computing eigenvalues/eigenvectors

  1. #1

    Default c++ matrix library for computing eigenvalues/eigenvectors

    Does anyone have recommendations for a good matrix library for C++ for computing eigenvectors and eigenvalues? I'm more interested in ease of programming than speed.

    There are a number of competing libraries, and I'm wondering which may be better for my uses.

  2. #2
    Join Date
    Jun 2008
    Location
    Oregon, US
    Posts
    109

    Default Re: c++ matrix library for computing eigenvalues/eigenvector

    I've used both the standard netlib lapack and blas, as well as the Intel Math Kernel Library. The Intel one is faster, but might not be free. You may be able to get a free version for educational use, but I don't recall for sure.

    The netlib lapack and blas can just be installed via yast, and works fine, if a bit slower. I think this is basically the standard that everyone uses, so there is probably way more info online on how to use it then others.

    I think you can also use the gsl (GNU Scientific Library), but I have not tried this.

    Note that the netlib software is written in Fortran, but you should be able to use the libraries with C++.

  3. #3
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    301

    Default Re: c++ matrix library for computing eigenvalues/eigenvector

    Hi,

    there is also a boost module for Boost Basic Linear Algebra.
    There are more math modules available too Library Documentation - Math and numerics maybe you'll find something useful in there

    Hope this helps

  4. #4

    Default Re: c++ matrix library for computing eigenvalues/eigenvectors

    Hello,

    I used ARPACK++:
    ARPACK - Arnoldi Package

    Here are the instructions needed to get it working:
    https://help.ubuntu.com/community/Ar...ith%20ARPACK++

    It is good at working with large matrices (I tried n = 10000: finds 2 smallest eigenvalues in 6 seconds; n = 15000: in 2 min 9 sec; n = 20000: crashes due to bad alloc, but I'm not sure if it's not my fault (: ).

    However, documentation contains errors. For example, I was lead into believing that CSC format stores non-zero row numbers starting from 1. However, numeration starts from 0. Error messages could also be more informative.

    Good luck..

  5. #5

    Default Re: c++ matrix library for computing eigenvalues/eigenvectors

    The basic functionality should be more or less the same for all major libraries, once you are doing real numerical work you will have to reevaluate for features and performance anyways.

    My favorite because of ease of use would be Eigen:
    Main Page - Eigen

    Try the tutorial: Eigen: Tutorial 1/3 - Core features

Posting Permissions

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