Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.53 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.53 KB

HArpack

This is a fork of HEigs with similar functionality but a fairly different interface.

It currently supports symmetrical and non-symmetrical eigenvalues problems of the form Mx = λx

Its fundamental data type is the SparseMatrix:

data SparseMatrix =
  SparseMatrix { dim ::Int
               , indexes :: [((Int,Int),Double)] }

The eigenpair problem is represented by the Problem type:

data Problem = Symmetric SWhich
             | NonSymmetric NWhich

where SWhich and NWhich represents the eigenvalues to be found.

  • The first character refers to Symmetric or Non-Symmetric;
  • The second refers to Largest or Smallest;
  • The third refers to Magnitude, Algebraic, Real, Imaginary;
  • The option BE means BEtween, for central eigenvalues.

The data types are:

data SWhich = SLM | SSM | SLA | SSA | SBE
data NWhich = NLM | NSM | NLR | NSR | NLI | NSI

The result is given as:

data Result = RError
            | RReal [(Double,Vector Double)]
            | RComplex [(Complex Double, Vector (Complex Double))]

This decision can certainly be improved, I accept suggestions. Finally, the eigs function does what we expect:

eigs :: SparseMatrix
     -> Problem
     -> HowMany
     -> Result

Notes

Currently building with: