Menu

Commit [r7]  Maximize  Restore  History

add "void unique()" for dssmatrix

a few tiny modifitation on dssmatrix

yonishi 2006-04-20

changed /trunk/include/cpplapack.h
changed /trunk/include/dssmatrix-/dssmatrix-io.hpp
changed /trunk/include/dssmatrix-/dssmatrix-misc.hpp
changed /trunk/include/dssmatrix-/dssmatrix.hpp
/trunk/include/cpplapack.h Diff Switch to side-by-side view
--- a/trunk/include/cpplapack.h
+++ b/trunk/include/cpplapack.h
@@ -29,7 +29,7 @@
 #endif//CPPL_EPS
 
 #ifndef CPPL_SS_SECTOR
-#define CPPL_SS_SECTOR 100
+#define CPPL_SS_SECTOR 10000
 #endif//CPPL_SS_SECTOR
 
 //=============================================================================
/trunk/include/dssmatrix-/dssmatrix-io.hpp Diff Switch to side-by-side view
--- a/trunk/include/dssmatrix-/dssmatrix-io.hpp
+++ b/trunk/include/dssmatrix-/dssmatrix-io.hpp
@@ -45,12 +45,13 @@
   }
 #endif//CPPL_DEBUG
   
+  //// search (i,j) component ////
   for(long c=0; c<VOL; c++){
     if(Indx[c]==i && Jndx[c]==j){ return Array[c]; }
   }
   
   //// (i,j) component not found ////
-  if(VOL==CAP){ 
+  if(VOL==CAP){
     expand(CPPL_SS_SECTOR);
 #ifdef  CPPL_DEBUG
     std::cerr << "[NOTE] dssmatrix::put(long&, long&, double&) "
@@ -68,7 +69,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 //=============================================================================
-/*! put value with isListed check and volume cheack */
+/*! put value with volume cheack without isListed check */
 inline void dssmatrix::put(const long& i, const long& j, const double& v)
 {
 #ifdef  CPPL_VERBOSE
@@ -85,11 +86,6 @@
     exit(1);
   }
 #endif//CPPL_DEBUG
-  
-  //// in case (i,j) already exists ////
-  for(long c=0; c<VOL; c++){
-    if(Indx[c]==i && Jndx[c]==j){ Array[c]=v; return; }
-  }
   
   //// in case (i,j) doesnot exist ////
   if(VOL==CAP){ 
/trunk/include/dssmatrix-/dssmatrix-misc.hpp Diff Switch to side-by-side view
Loading...
/trunk/include/dssmatrix-/dssmatrix.hpp Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.