Changeset 516e91c in tol
- Timestamp:
- Mar 9, 2009, 8:57:24 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 7168a54
- Parents:
- 2b448e9
- File:
-
- 1 edited
-
tol/btol/vmatrix_type/vmatgra.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/vmatrix_type/vmatgra.cpp
r2b448e9 r516e91c 202 202 if(Arg(2)) { chop=Real(Arg(2)); } 203 203 contens_=VMat(Arg(1)).NonNullCells(chop); 204 } 205 206 //-------------------------------------------------------------------- 207 DeclareContensClass(BDat, BDatTemporary, BDatStoredCells); 208 DefExtOpr(1, BDatStoredCells, "VStoredCells", 1, 1, 209 "VMatrix", 210 "(VMatrix V)", 211 I2("Returns the number of stored cells of a virtual matrix.", 212 "Devuelve el numero de celdas almacenadas de una matriz virtual."), 213 BOperClassify::MatrixAlgebra_); 214 //-------------------------------------------------------------------- 215 void BDatStoredCells::CalcContens() 216 //-------------------------------------------------------------------- 217 { 218 const double *x; 219 int nzmax; 220 VMat(Arg(1)).StoredData(x,nzmax); 221 contens_=nzmax; 204 222 } 205 223 … … 447 465 assert(contens_.Check()); 448 466 } 467 468 //-------------------------------------------------------------------- 469 DeclareContensClass(BVMat, BVMatTemporary, BVMatPack); 470 DefExtOpr(1, BVMatPack, "Pack", 1, 1, 471 "VMatrix", 472 "(VMatrix data)", 473 I2("Packs an sparse matrix to be stored in the minimum posible size." 474 "It has no effect over non sparse matrices.", 475 "Empaqueta una matriz sparse para que ocupe el mínimo espacio posible." 476 "No tiene ningún efecto sobre matrices no sparse."), 477 BOperClassify::MatrixAlgebra_); 478 //-------------------------------------------------------------------- 479 void BVMatPack::CalcContens() 480 //-------------------------------------------------------------------- 481 { 482 contens_.Copy(VMat(Arg(1))); 483 contens_.Pack(); 484 assert(contens_.Check()); 485 } 486 449 487 450 488 //-------------------------------------------------------------------- … … 1117 1155 //-------------------------------------------------------------------- 1118 1156 { 1119 BVMat::Drop(VMat(Arg(1)),Real(Arg(2)),contens_); 1120 assert(contens_.Check()); 1121 } 1122 1157 contens_.Copy(VMat(Arg(1))); 1158 double drop = 0; 1159 if(Arg(2)) { drop = Real(Arg(2)); } 1160 contens_.Drop(drop); 1161 assert(contens_.Check()); 1162 } 1123 1163 1124 1164 #define DecMonaryF00(FUN,ENGLISH,SPANISH) \
Note: See TracChangeset
for help on using the changeset viewer.
