[PPL-devel] [GIT] ppl/ppl(master): Delimit pseudo-code in non-Doxygen comments within < CODE> </CODE>. Comments improved.
Roberto Bagnara
bagnara at cs.unipr.it
Fri Feb 24 11:02:48 CET 2012
Module: ppl/ppl
Branch: master
Commit: 92d3b0df6261f177871ee667186d2c73bb1141d5
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=92d3b0df6261f177871ee667186d2c73bb1141d5
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Fri Feb 24 11:02:30 2012 +0100
Delimit pseudo-code in non-Doxygen comments within <CODE> </CODE>. Comments improved.
---
src/MIP_Problem.cc | 11 +++++++----
src/Octagonal_Shape.templates.hh | 11 +++++++----
src/PIP_Tree.cc | 6 ++++--
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/src/MIP_Problem.cc b/src/MIP_Problem.cc
index 83eeeb8..9eb8022 100644
--- a/src/MIP_Problem.cc
+++ b/src/MIP_Problem.cc
@@ -1685,10 +1685,13 @@ PPL::MIP_Problem::erase_artificials(const dimension_type begin_artificials,
// ... then properly set the element in the (new) last column,
// encoding the kind of optimization; ...
{
- // This block is equivalent to:
- // working_cost[new_last_column] = working_cost.get(old_last_column);
- // But it avoids storing zeroes.
-
+ // This block is equivalent to
+ //
+ // <CODE>
+ // working_cost[new_last_column] = working_cost.get(old_last_column);
+ // </CODE>
+ //
+ // but it avoids storing zeroes.
Coefficient_traits::const_reference old_cost
= working_cost.get(old_last_column);
if (old_cost == 0)
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh
index 1e4a0b8..b029054 100644
--- a/src/Octagonal_Shape.templates.hh
+++ b/src/Octagonal_Shape.templates.hh
@@ -1305,7 +1305,7 @@ Octagonal_Shape<T>::frequency(const Linear_Expression& expr,
// and return true. Otherwise the values for \p expr
// are not discrete so return false.
- // Space dimension = 0: if empty, then return false;
+ // Space dimension is 0: if empty, then return false;
// otherwise the frequency is 0 and the value is the inhomogeneous term.
if (space_dim == 0) {
if (is_empty())
@@ -2447,9 +2447,12 @@ Octagonal_Shape<T>::strong_closure_assign() const {
// Unfolding two iterations on `j': this ensures that
// the loop exit condition `j <= i' is OK.
for (dimension_type j = 0; j <= i; ) {
- // First iteration:
- // sum1 = x_i_k + x_k_j == x_ck_ci + x_k_j;
- // sum2 = x_i_ck + x_ck_j == x_k_ci + x_ck_j.
+ // First iteration: compute
+ //
+ // <CODE>
+ // sum1 = x_i_k + x_k_j == x_ck_ci + x_k_j;
+ // sum2 = x_i_ck + x_ck_j == x_k_ci + x_ck_j;
+ // </CODE>
add_assign_r(sum1, vec_ck_ci, vec_k[j], ROUND_UP);
add_assign_r(sum2, vec_k_ci, vec_ck[j], ROUND_UP);
min_assign(sum1, sum2);
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index b091292..b7dbbb2 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -257,7 +257,8 @@ column_lower(const Matrix& tableau,
const dimension_type num_vars = mapping.size();
dimension_type k = 0;
// While loop guard is: (k < num_rows && lhs == rhs).
- // Return value is false, if k >= num_rows; lhs < rhs, otherwise.
+ // Return value is false, if k >= num_rows; it is equivalent to
+ // lhs < rhs, otherwise.
// Try to optimize the computation of lhs and rhs.
while (true) {
const dimension_type mk = mapping[k];
@@ -282,7 +283,8 @@ column_lower(const Matrix& tableau,
}
// Optimizing for: lhs == 0 && rhs == 0;
continue;
- } else {
+ }
+ else {
// Not in base.
const Row& t_mk = tableau[mk];
Coefficient_traits::const_reference t_mk_ja = t_mk.get(ja);
More information about the PPL-devel
mailing list