[PPL-devel] [GIT] ppl/ppl(sparse_matrices): MIP_Problem: clarify code in linear_combine ().

Marco Poletti poletti.marco at gmail.com
Thu Mar 25 19:14:20 CET 2010


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

Author: Marco Poletti <poletti.marco at gmail.com>
Date:   Thu Mar 25 19:08:34 2010 +0100

MIP_Problem: clarify code in linear_combine().

---

 src/MIP_Problem.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/MIP_Problem.cc b/src/MIP_Problem.cc
index f673c42..d316260 100644
--- a/src/MIP_Problem.cc
+++ b/src/MIP_Problem.cc
@@ -1243,7 +1243,7 @@ PPL::MIP_Problem::linear_combine(matrix_row_reference_type x,
                                  const dimension_type k) {
   WEIGHT_BEGIN();
   const dimension_type x_size = x.size();
-  Coefficient& x_k = x[k];
+  const Coefficient& x_k = x.get(k);
   const Coefficient& y_k = y.get(k);
   PPL_ASSERT(y_k != 0 && x_k != 0);
   // Let g be the GCD between `x[k]' and `y[k]'.
@@ -1269,7 +1269,7 @@ PPL::MIP_Problem::linear_combine(row_type& x,
                                  const dimension_type k) {
   WEIGHT_BEGIN();
   const dimension_type x_size = x.size();
-  Coefficient& x_k = x[k];
+  const Coefficient& x_k = x.get(k);
   const Coefficient& y_k = y.get(k);
   PPL_ASSERT(y_k != 0 && x_k != 0);
   // Let g be the GCD between `x[k]' and `y[k]'.




More information about the PPL-devel mailing list