[PPL-devel] [GIT] ppl/ppl(pip): Removed useless utility function.
François Galea
francois.galea at uvsq.fr
Thu Nov 26 11:04:55 CET 2009
Module: ppl/ppl
Branch: pip
Commit: 3c903922ece89f223620dd56311d4ef7ea1882a2
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=3c903922ece89f223620dd56311d4ef7ea1882a2
Author: François Galea <francois.galea at uvsq.fr>
Date: Wed Nov 25 17:26:20 2009 +0100
Removed useless utility function.
---
src/PIP_Tree.cc | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index de77be6..df37fe9 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -112,29 +112,6 @@ update_context(Variables_Set ¶ms, Matrix &context,
}
}
-void
-row_normalize(Row& x) {
- dimension_type size = x.size();
- if (size == 0)
- return;
- dimension_type j;
- PPL_DIRTY_TEMP_COEFFICIENT(gcd);
- gcd = x[0];
- for (j=1; j<size; ++j) {
- const Coefficient& c = x[j];
- if (c != 0) {
- gcd_assign(gcd, c, gcd);
- if (gcd == 1)
- return;
- }
- }
- // Divide the coefficients by the GCD.
- for (j=0; j<size; ++j) {
- Coefficient& c = x[j];
- exact_div_assign(c, c, gcd);
- }
-}
-
} // namespace
namespace IO_Operators {
@@ -1605,7 +1582,7 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref,
<< std::endl;
#endif
Row r(tableau.t[i]);
- row_normalize(r);
+ r.normalize();
context.add_row(r);
add_constraint(r, parameters);
sign[i] = POSITIVE;
@@ -1639,7 +1616,7 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref,
i__ = best_i;
Row test(tableau.t[i__]);
- row_normalize(test);
+ test.normalize();
#ifdef NOISY_PIP
{
using namespace IO_Operators;
More information about the PPL-devel
mailing list