[PPL-devel] [GIT] ppl/ppl(sparse_matrices): Sparse_Row: make the constructor from a Dense_Row work even when Coefficient_traits:: const_reference is Coefficient.

Marco Poletti poletti.marco at gmail.com
Mon Sep 20 08:58:15 CEST 2010


Module: ppl/ppl
Branch: sparse_matrices
Commit: 23bd68d17e27f4da6c7edb64556c8bc771e47b31
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=23bd68d17e27f4da6c7edb64556c8bc771e47b31

Author: Marco Poletti <poletti.marco at gmail.com>
Date:   Mon Sep 20 08:56:47 2010 +0200

Sparse_Row: make the constructor from a Dense_Row work even when Coefficient_traits::const_reference is Coefficient.

---

 src/Sparse_Row.cc |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/Sparse_Row.cc b/src/Sparse_Row.cc
index 19a5ab9..69af756 100644
--- a/src/Sparse_Row.cc
+++ b/src/Sparse_Row.cc
@@ -53,18 +53,12 @@ public:
     return tmp;
   }
 
-  const PPL::Coefficient&
+  PPL::Coefficient_traits::const_reference
   operator*() const {
     PPL_ASSERT(i < row.size());
     return row[i];
   }
 
-  const PPL::Coefficient*
-  operator->() const {
-    PPL_ASSERT(i < row.size());
-    return &(*(*this));
-  }
-
   PPL::dimension_type
   index() const {
     PPL_ASSERT(i < row.size());




More information about the PPL-devel mailing list