Changeset 9434 in ntrip for trunk/BNC/newmat/submat.cpp


Ignore:
Timestamp:
May 19, 2021, 1:32:38 PM (3 years ago)
Author:
stuerze
Message:

newmat is reverted to its stable version 10 because version 11beta was not working with mac compilers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/newmat/submat.cpp

    r8901 r9434  
    257257      if (row_number != gmx->Nrows() || col_number != gmx->Ncols())
    258258         Throw(IncompatibleDimensionsException());
    259       if (gm->type().is_symmetric() &&
    260          ( ! gmx->type().is_symmetric() || row_skip != col_skip) )
    261          Throw(ProgramException("Illegal operation on symmetric"));
    262259      MatrixRow mrx(gmx, LoadOnEntry);
    263260      MatrixRow mr(gm, LoadOnEntry+StoreOnExit+DirectPart, row_skip);
     
    280277}
    281278
    282 void GetSubMatrix::SP_eq(const BaseMatrix& bmx)
    283 {
    284    REPORT
    285    Tracer tr("SubMatrix(SP_eq)"); GeneralMatrix* gmx = 0;
     279void GetSubMatrix::operator-=(const BaseMatrix& bmx)
     280{
     281   REPORT
     282   Tracer tr("SubMatrix(-=)"); GeneralMatrix* gmx = 0;
    286283   // MatrixConversionCheck mcc;         // Check for loss of info
    287284   Try
     
    290287      if (row_number != gmx->Nrows() || col_number != gmx->Ncols())
    291288         Throw(IncompatibleDimensionsException());
    292       if (gm->type().is_symmetric() &&
    293          ( ! gmx->type().is_symmetric() || row_skip != col_skip) )
    294          Throw(ProgramException("Illegal operation on symmetric"));
    295       MatrixRow mrx(gmx, LoadOnEntry);
    296       MatrixRow mr(gm, LoadOnEntry+StoreOnExit+DirectPart, row_skip);
    297                                      // do need LoadOnEntry
    298       MatrixRowCol sub; int i = row_number;
    299       while (i--)
    300       {
    301          mr.SubRowCol(sub, col_skip, col_number);   // put values in sub
    302          sub.Multiply(mrx); mr.Next(); mrx.Next();
    303       }
    304       gmx->tDelete();
    305    }
    306 
    307    CatchAll
    308    {
    309       if (gmx) gmx->tDelete();
    310       ReThrow;
    311    }
    312 }
    313 
    314 void GetSubMatrix::operator-=(const BaseMatrix& bmx)
    315 {
    316    REPORT
    317    Tracer tr("SubMatrix(-=)"); GeneralMatrix* gmx = 0;
    318    // MatrixConversionCheck mcc;         // Check for loss of info
    319    Try
    320    {
    321       SetUpLHS(); gmx = ((BaseMatrix&)bmx).Evaluate();
    322       if (row_number != gmx->Nrows() || col_number != gmx->Ncols())
    323          Throw(IncompatibleDimensionsException());
    324       if (gm->type().is_symmetric() &&
    325          ( ! gmx->type().is_symmetric() || row_skip != col_skip) )
    326          Throw(ProgramException("Illegal operation on symmetric"));
    327289      MatrixRow mrx(gmx, LoadOnEntry);
    328290      MatrixRow mr(gm, LoadOnEntry+StoreOnExit+DirectPart, row_skip);
Note: See TracChangeset for help on using the changeset viewer.