Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-03-21 09:49:36


On Friday 18 March 2005 15:52, Andreas Klöckner wrote:
> > and incomplete Cholesky (for use as preconditioner)?
>
> Nope, not yet. Dr. Tim Davis (UMFPACK's author) has apparently devised a
> sparse Cholesky algorithm that can be implemented in ~80 lines of
> code. Might be worth looking at, even reimplementing, to avoid another
> kludgy binding.

actually a sparse ILU/IC has very few lines:

ILU for matrix Z
for i = 2:n
  for k = 1:i-1
    if Z(i,k) <> 0 then
      Z(i,k) = Z(i,k) / Z(k,k);
      for j = k+1:n
        if Z(i,j) <> 0 then
   Z(i,j) = Z(i,j) - Z(i,k)*Z(k,j)
 end
      next j
    end
  next k
next i

but it's a little more tricky to have a fast implementation, that creates L
and U on the fly.

mfg
Gunter