Changeset 9434 in ntrip for trunk/BNC/newmat/newmat6.cpp
- Timestamp:
- May 19, 2021, 1:32:38 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/newmat/newmat6.cpp
r8901 r9434 495 495 Tracer tr("GeneralMatrix::operator+="); 496 496 // MatrixConversionCheck mcc; 497 Protect(); // so it cannot get deleted during Evaluate 497 Protect(); // so it cannot get deleted 498 // during Evaluate 498 499 GeneralMatrix* gm = ((BaseMatrix&)X).Evaluate(); 499 500 AddedMatrix am(this,gm); 500 501 if (gm==this) Release(2); else Release(); 501 502 Eq2(am,type()); 502 }503 504 // GeneralMatrix operators505 506 void GeneralMatrix::SP_eq(const BaseMatrix& X)507 {508 REPORT509 Tracer tr("GeneralMatrix::SP_eq");510 // MatrixConversionCheck mcc;511 Protect(); // so it cannot get deleted during Evaluate512 GeneralMatrix* gm = ((BaseMatrix&)X).Evaluate();513 SPMatrix spm(this,gm);514 if (gm==this) Release(2); else Release();515 Eq2(spm,type());516 503 } 517 504 … … 599 586 if (gmx==gm) gm->Release(2); else gm->Release(); 600 587 GeneralMatrix* gmy = am.Evaluate(); 601 if (gmy != gm) { REPORT delete gm; gm = gmy->Image(); }602 else { REPORT }603 gm->Protect();604 }605 606 void GenericMatrix::SP_eq(const BaseMatrix& X)607 {608 REPORT609 Tracer tr("GenericMatrix::SP_eq");610 if (!gm) Throw(ProgramException("GenericMatrix is null"));611 gm->Protect(); // so it cannot get deleted during Evaluate612 GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate();613 SPMatrix spm(gm,gmx);614 if (gmx==gm) gm->Release(2); else gm->Release();615 GeneralMatrix* gmy = spm.Evaluate();616 588 if (gmy != gm) { REPORT delete gm; gm = gmy->Image(); } 617 589 else { REPORT }
Note:
See TracChangeset
for help on using the changeset viewer.