Update of /cvsroot/boost/boost/boost/numeric/ublas
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3341/boost/numeric/ublas

Modified Files:
        vector_of_vector.hpp 
Log Message:
FIX nnz and nnz_capacitz added. Thanks Gunter

Index: vector_of_vector.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/numeric/ublas/vector_of_vector.hpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- vector_of_vector.hpp        18 May 2006 16:44:57 -0000      1.27
+++ vector_of_vector.hpp        16 Jul 2006 13:48:52 -0000      1.28
@@ -110,10 +110,17 @@
             return size2_;
         }
         BOOST_UBLAS_INLINE
-        size_type non_zeros () const {
+        size_type nnz_capacity () const {
             size_type non_zeros = 0;
-            for (const_vectoriterator_type itv = data_ ().begin (); itv != 
data_ ().end (); ++ itv)
-                non_zeros += (*itv).size ();
+            for (const_vectoriterator_type itv = data_.begin (); itv != 
data_.end (); ++ itv)
+                non_zeros += (*itv).nnz_capacity ();
+            return non_zeros;
+        }
+        BOOST_UBLAS_INLINE
+        size_type nnz () const {
+            size_type non_zeros = 0;
+            for (const_vectoriterator_type itv = data_.begin (); itv != 
data_.end (); ++ itv)
+                non_zeros += (*itv).nnz ();
             return non_zeros;
         }
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to