[mathicgb] 345/393: Further simplification of MonomialTableArray.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:59:32 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 d96760073d44240e9b3adc2b847f2a620a7f96e0
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date:   Wed Aug 28 18:08:14 2013 +0200

    Further simplification of MonomialTableArray.
---
 src/mathicgb/MTArray.cpp     |  7 ++++---
 src/mathicgb/MTArray.hpp     | 11 +----------
 src/mathicgb/SignatureGB.cpp |  3 +--
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/mathicgb/MTArray.cpp b/src/mathicgb/MTArray.cpp
index 5cf68b2..e2b7276 100755
--- a/src/mathicgb/MTArray.cpp
+++ b/src/mathicgb/MTArray.cpp
@@ -15,7 +15,7 @@ class MTArrayT : public MonomialTableArray
   typedef typename MT::Configuration Conf;
 public:
   MTArrayT(size_t components, const Conf &conf):
-    MonomialTableArray(conf.getPolyRing()), conf_(conf) {
+    R(conf.getPolyRing()), conf_(conf) {
     for (size_t i = 0; i < components; ++i)
       addComponent();
   }
@@ -37,7 +37,7 @@ public:
 
   bool member(const_monomial m);
 
-  std::string description() const;
+  virtual std::string name() const;
 
   void display(std::ostream &o) const;
 
@@ -47,6 +47,7 @@ public:
 
   size_t getMemoryUse() const;
 private:
+  const PolyRing* R;
   Conf conf_; // Used to create new instances of T.
   std::vector<T *> tables;
 };
@@ -133,7 +134,7 @@ size_t MTArrayT<MT>::getMemoryUse() const
 }
 
 template <typename MT>
-std::string MTArrayT<MT>::description() const
+std::string MTArrayT<MT>::name() const
 {
   T obj(getConfiguration());
   return obj.getName();
diff --git a/src/mathicgb/MTArray.hpp b/src/mathicgb/MTArray.hpp
index 2931aa3..8d7667d 100755
--- a/src/mathicgb/MTArray.hpp
+++ b/src/mathicgb/MTArray.hpp
@@ -20,11 +20,6 @@ public:
   // active until it is removed from the table.
   virtual bool insert(const_monomial m) = 0;
 
-  // Adds a new component, increasing the number of monomial tables
-  // in the array by one. Its index is one more than the previous
-  // maximum index.
-  virtual void addComponent() = 0;
-
   virtual bool member(const_monomial m) = 0;
 
   virtual void display(std::ostream& o) const = 0;
@@ -33,7 +28,7 @@ public:
 
   virtual size_t n_elems() const = 0;
 
-  virtual std::string description() const = 0;
+  virtual std::string name() const = 0;
 
   virtual size_t getMemoryUse() const = 0;
 
@@ -41,10 +36,6 @@ public:
   static int displayMTTypes(std::ostream &o); // returns n s.t. 0..n-1 are valid types
   static std::unique_ptr<MonomialTableArray>
     make(const PolyRing *R, int typ, size_t components, bool allowRemovals);
-
-protected:
-  MonomialTableArray(const PolyRing *R0) : R(R0) {}
-  const PolyRing *R;
 };
 
 MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/SignatureGB.cpp b/src/mathicgb/SignatureGB.cpp
index a8bad68..f0d85f4 100755
--- a/src/mathicgb/SignatureGB.cpp
+++ b/src/mathicgb/SignatureGB.cpp
@@ -179,7 +179,6 @@ bool SignatureGB::processSPair
     std::unique_ptr<Poly> uniqueF(f);
     GB->insert(sig, std::move(uniqueF));
   }
-  Hsyz->addComponent();
   SP->newPairs(GB->size()-1);
 
   if (tracingLevel >= 1) {
@@ -302,7 +301,7 @@ void SignatureGB::displayStats(std::ostream &o) const
     << (mUseBaseDivisors ? "-basediv" : "") << '\n';
   o << " reduction type: " << reducer->description() << '\n';
   o << " divisor tab type: " << GB->basis().monoLookup().getName() << '\n';
-  o << " syzygy tab type: " << Hsyz->description() << '\n';
+  o << " syzygy tab type: " << Hsyz->name() << '\n';
   o << " S-pair queue type: " << SP->name() << '\n';
   o << " total compute time:  " << stats_nsecs << " -- seconds" << '\n';
 

-- 
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