From: Michael Bowers <mbowers@ci...>  20101214 20:44:04

Dear Vxl Maintainers, I've created a first cut of a generalized sparse symmetric eigensystem solver in vxl. Essentially it consists of an additional method in vnl_sparse_symmetric_eigensystem: int CalculateNPairs(vnl_sparse_matrix<double>& A, vnl_sparse_matrix<double>& B, int nEV, double tolerance = 0, int numberLanczosVecs = 0, bool smallest = false, bool magnitude = true, int maxIterations = 0, double sigma = 0.0); It's based on ARPACK, which required a number of new ARPACK and LAPACK code conversions. It performs either the standard (DSAUPD mode 2) or the shiftandinvert (mode 3) solution of the problem: A * x = lambda * B * x where A and B are sparse and symmetric. B is positive definite. As stated above, it's a first draft. An issue I didn't address is thread safety of the f2c converted routines. ARPACK uses a "reverse communication interface" process which might complicate the problem. I'm attaching a patch file created from the current svn repository. Please check it out and forward any comments. Thank you, Michael Bowers Original Message From: Peter Vanroose [mailto:peter_vanroose@...] Sent: Tuesday, October 05, 2010 4:02 PM To: Michael Bowers Cc: Gehua Yang; vxl maintainers Subject: Re: generalized sparse symmetric eigensystem Michael, As to your questions: 1) In the past, we have just added the needed routines to netlib : an as minimal set as possible. 2) The Fortran source programs (also stored in v3p/netlib) have been "manually" converted from the .f by using f2c, in a threadsafe manner. Sources have been modified to use the v3p_*.h headers. Types and function names are prefixed with v3p_netlib_ . See v3p/netlib/README for the detailed procedure to follow. This setup documentation was written by Brad King (brad.king@...), so please contact him for any further details regarding the conversion etc. For the step towards vnl_algo (and C++), I'd say; design a "good" userfriendly interface, implementing the methods in a way similar to what was done for the other similar vnl_algo classes. As far as licenses are concerned: I suppose that a BSDstyle license is certainly compatible with the vxl license (and its usage); but some people on the vxl maintainers list can be more specific on this.  Peter. Michael Bowers wrote: > My name is Michael Bowers and I am at Johns Hopkins's > Center for Imaging Science. I've been using vxl for about > 5 years now on its own and via the Insight Tool Kit. > Vxl is sufficient for most of what I do and of course > it's a great package. > > I need a generalized sparse symmetric eigensystem > class. Are there plans to add one to vnl_algo in > the near future? Do you think it would be a great > deal of work? If there aren't resources there to > do it I might be able to contribute one with a little > guidance. > [...] > 1) ARPACK  http://www.caam.rice.edu/software/ARPACK/. > ARPACK software is capable of solving large scale symmetric, > nonsymmetric, and generalized eigenproblems from significant > application areas. > It has a C++ interface called ARPACK++. I've used ARPACK++, > but it includes a lot of dependencies. > > 2) Lanz  Order code that solves the large, sparse, > symmetric generalized eigenproblem. > > 3) Lanczos  Linear algebra routines with a nonGPL, > nonBSD type license. > > What is the general approach when adding netlib code? > > 1) Is the whole library generally added, or just the > routines necessary? > 2) Is the code converted from FORTRAN to c by hand? > > I'd like to add the sparse, generalized, eigenproblem to > vnl_algo. I'd appreciate any thoughts/guidance on the > process you have for me. 