IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 21, 2006, 8:29:07 AM (19 years ago)
Author:
magnier
Message:

divide initial guess by Qii (previously assumed input matrix was normalized)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psSparse.c

    r10017 r10121  
    141141}
    142142
     143// solve Ax = B
    143144psVector *psSparseSolve(psVector *output, psSparseConstraint constraint, const psSparse *sparse, int Niter)
    144145{
     
    151152    psVector *Bfj = sparse->Bfj;
    152153
     154    // initial guess is B / Qii
    153155    output = psVectorCopy(output, Bfj, PS_DATA_F32);
     156    for (int i = 0; i < output->n; i++) {
     157        output->data.F32[i] /= Qii->data.F32[i];
     158    }
    154159
    155160    // temporary storage for intermediate results
     
    429434
    430435        // solve Sx = f
    431         xVec = psSparseSolve(xVec, constraint, border->sparse, 4);
     436        xVec = psSparseSolve(xVec, constraint, border->sparse, Niter);
    432437
    433438        dG = psSparseBorderLowerProduct (dG, border, xVec);
Note: See TracChangeset for help on using the changeset viewer.