Changeset d11b5b0 in tol


Ignore:
Timestamp:
Mar 9, 2009, 8:56:48 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
2b448e9
Parents:
8ac1037
Message:

New method Pack

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@703 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/vmat.cpp

    r8ac1037 rd11b5b0  
    168168  force_natural_order(false);
    169169
     170  //No growing allowed
     171  common_->grow2 = 0;
     172
    170173/* * /
    171174//MatLab lchol options
    … …  
    279282  return(result);
    280283}
     284
     285////////////////////////////////////////////////////////////////////////////////
     286  void BVMat::Pack()
     287//Importing method
     288////////////////////////////////////////////////////////////////////////////////
     289{
     290  switch(code_) {
     291  case(ESC_blasRdense  ) :
     292  {
     293    break;
     294  }
     295  case(ESC_chlmRsparse ) :
     296  {
     297    int nnz = NonNullCells(0);
     298    if(s_.chlmRsparse_->nzmax > nnz)
     299    {
     300      cholmod_drop(0,s_.chlmRsparse_, common_);
     301    }
     302    cholmod_sort(s_.chlmRsparse_, common_);
     303    break;
     304  }
     305  case(ESC_chlmRfactor ) :
     306  {
     307    cholmod_pack_factor(s_.chlmRfactor_,common_);
     308    break;
     309  }
     310  case(ESC_chlmRtriplet) :
     311  {
     312    int nnz = NonNullCells(0);
     313    if(s_.chlmRtriplet_->nzmax > nnz)
     314    {
     315      Drop(0);
     316    }
     317    break;
     318  }
     319  default:
     320    Error(I2("FATAL ERROR in",
     321             "ERROR FATAL en")+" BVMat::Pack(const BVMat& v)");
     322    assert(1); }
     323};
    281324
    282325////////////////////////////////////////////////////////////////////////////////
    … …  
    10281071  if(Rows()!=Columns()) { return(false); }
    10291072  BVMat t = this->T();
    1030   BVMat z = ((*this)-t).Drop(DEpsilon());
     1073  BVMat z = Drop(((*this)-t),DEpsilon());
    10311074  bool isSymm = z.NonNullCells()==0;
    10321075  return(isSymm);
Note: See TracChangeset for help on using the changeset viewer.