Changeset 1567 for trunk/MagicSoft/Mars/mhist/MHMatrix.cc
- Timestamp:
- 10/30/02 16:52:01 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1554 r1567 367 367 if (det==0) 368 368 { 369 *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is si gular)." << endl;369 *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is singular)." << endl; 370 370 delete m2; 371 371 return NULL; … … 441 441 res += exp(-dists[idx[i]]/h); 442 442 443 return log(res/n);443 return -log(res/n); 444 444 } 445 445 else … … 466 466 if (!fM2.IsValid()) 467 467 { 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; 471 474 fM2 *= fM.GetNrows()-1; 472 delete &m;475 delete m; 473 476 } 474 477
Note:
See TracChangeset
for help on using the changeset viewer.