Ignore:
Timestamp:
10/30/02 16:52:01 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHMatrix.cc

    r1554 r1567  
    367367    if (det==0)
    368368    {
    369         *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is sigular)." << endl;
     369        *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is singular)." << endl;
    370370        delete m2;
    371371        return NULL;
     
    441441            res += exp(-dists[idx[i]]/h);
    442442
    443         return log(res/n);
     443        return -log(res/n);
    444444    }
    445445    else
     
    466466    if (!fM2.IsValid())
    467467    {
    468         const TMatrix &m = *InvertPosDef();
    469         fM2.ResizeTo(m);
    470         fM2 = m;
     468        const TMatrix *m = InvertPosDef();
     469        if (!m)
     470            return -1;
     471
     472        fM2.ResizeTo(*m);
     473        fM2 = *m;
    471474        fM2 *= fM.GetNrows()-1;
    472         delete &m;
     475        delete m;
    473476    }
    474477
Note: See TracChangeset for help on using the changeset viewer.