[mathicgb] 323/393: Removed C++11 auto's from public header file mathicgb.h and fixed a comment in the tests for that file.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:59:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository mathicgb.

commit 7b531a0fb48f88efb6f50e3edae18269727064ac
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date:   Thu Aug 1 16:08:10 2013 +0200

    Removed C++11 auto's from public header file mathicgb.h and fixed a comment in the tests for that file.
---
 src/mathicgb.h        | 13 +++++++------
 src/test/mathicgb.cpp |  2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/mathicgb.h b/src/mathicgb.h
old mode 100644
new mode 100755
index 4c3973d..e6af0c2
--- a/src/mathicgb.h
+++ b/src/mathicgb.h
@@ -470,6 +470,7 @@ namespace mgbi {
     typedef GroebnerConfiguration::Coefficient Coefficient;
     typedef GroebnerConfiguration::VarIndex VarIndex;
     typedef GroebnerConfiguration::Exponent Exponent;
+    typedef std::pair<Coefficient, const Exponent*> ConstTerm;
     typedef size_t PolyIndex;
     typedef size_t TermIndex;
 
@@ -479,8 +480,7 @@ namespace mgbi {
     VarIndex varCount() const;
     size_t polyCount() const;
     size_t termCount(PolyIndex poly) const;
-    std::pair<Coefficient, const Exponent*> term
-      (PolyIndex poly, TermIndex term) const;
+    ConstTerm term(PolyIndex poly, TermIndex term) const;
 
   private:
     friend class ::mgbi::PimplOf;
@@ -500,18 +500,19 @@ namespace mgb {
     GroebnerInputIdealStream& inputWhichWillBeCleared,
     OutputStream& output
   ) {
+    typedef mgbi::IdealAdapter::ConstTerm ConstTerm;
     mgbi::IdealAdapter ideal;
     mgbi::internalComputeGroebnerBasis(inputWhichWillBeCleared, ideal);
 
-    const auto varCount = ideal.varCount();
-    const auto polyCount = ideal.polyCount();
+    const size_t varCount = ideal.varCount();
+    const size_t polyCount = ideal.polyCount();
     output.idealBegin(polyCount);
     for (size_t polyIndex = 0; polyIndex < polyCount; ++polyIndex) {
-      const auto termCount = ideal.termCount(polyIndex);
+      const size_t termCount = ideal.termCount(polyIndex);
       output.appendPolynomialBegin(termCount);
       for (size_t termIndex = 0; termIndex < termCount; ++termIndex) {
         output.appendTermBegin();
-        const auto term = ideal.term(polyIndex, termIndex);
+        const ConstTerm term = ideal.term(polyIndex, termIndex);
         for (size_t var = 0; var < varCount; ++var)
           output.appendExponent(var, term.second[var]);
         output.appendTermDone(term.first);
diff --git a/src/test/mathicgb.cpp b/src/test/mathicgb.cpp
old mode 100644
new mode 100755
index 5178eca..5c37f70
--- a/src/test/mathicgb.cpp
+++ b/src/test/mathicgb.cpp
@@ -53,7 +53,7 @@ namespace {
           s.appendExponent(2, 1);
         s.appendTermDone(s.modulus() - 1);
       s.appendPolynomialDone();
-      s.appendPolynomialBegin(2); // y^2 - xy
+      s.appendPolynomialBegin(2); // y^2 - xz
         s.appendTermBegin();
           s.appendExponent(0, 0);
           s.appendExponent(1, 2);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathicgb.git



More information about the debian-science-commits mailing list