[mathicgb] 354/393: Moved PolyHashTable closer to BjarkeGeobucket2's hash table and removed several superfluous reducers.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:59:34 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 3ed4d580be2aa58938ff26ce2dcaef2027689ee3
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date: Tue Sep 3 12:49:55 2013 +0200
Moved PolyHashTable closer to BjarkeGeobucket2's hash table and removed several superfluous reducers.
---
Makefile.am | 15 +-
build/vs12/mathicgb-lib/mathicgb-lib.vcxproj | 12 -
.../vs12/mathicgb-lib/mathicgb-lib.vcxproj.filters | 36 ---
src/cli/GBCommonParams.cpp | 2 +-
src/mathicgb/BjarkeGeobucket.cpp | 112 ---------
src/mathicgb/BjarkeGeobucket.hpp | 102 --------
src/mathicgb/BjarkeGeobucket2.cpp | 2 +-
src/mathicgb/HashTourReducer.cpp | 214 -----------------
src/mathicgb/HashTourReducer.hpp | 86 -------
src/mathicgb/PolyGeoBucket.cpp | 265 ---------------------
src/mathicgb/PolyGeoBucket.hpp | 58 -----
src/mathicgb/PolyHashReducer.cpp | 164 -------------
src/mathicgb/PolyHashReducer.hpp | 53 -----
src/mathicgb/PolyHashTable.cpp | 28 +--
src/mathicgb/PolyHashTable.hpp | 26 +-
src/mathicgb/PolyHeap.cpp | 179 --------------
src/mathicgb/PolyHeap.hpp | 72 ------
src/mathicgb/PolyReducer.cpp | 114 ---------
src/mathicgb/PolyReducer.hpp | 43 ----
src/mathicgb/Reducer.cpp | 26 +-
src/mathicgb/Reducer.hpp | 12 +-
src/mathicgb/ReducerHash.hpp | 2 +-
src/mathicgb/ReducerHashPack.hpp | 4 +-
src/mathicgb/SignatureGB.cpp | 1 -
src/mathicgb/TournamentReducer.cpp | 181 --------------
src/mathicgb/TournamentReducer.hpp | 80 -------
src/mathicgb/io-util.cpp | 2 -
src/test/gb-test.cpp | 247 +++++++++----------
src/test/pict.in | 2 +-
src/test/poly-test.cpp | 3 -
30 files changed, 160 insertions(+), 1983 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index bdccdc0..5b19c25 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,13 +14,11 @@ libmathicgb_la_LIBADD= $(DEPS_LIBS)
# the sources that are built to make libmathicgb. Listing the headers in
# sources ensure that those files are included in distributions.
libmathicgb_la_SOURCES = src/mathicgb/BjarkeGeobucket2.cpp \
- src/mathicgb/BjarkeGeobucket2.hpp src/mathicgb/BjarkeGeobucket.cpp \
- src/mathicgb/BjarkeGeobucket.hpp src/mathicgb/ClassicGBAlg.cpp \
+ src/mathicgb/BjarkeGeobucket2.hpp src/mathicgb/ClassicGBAlg.cpp \
src/mathicgb/ClassicGBAlg.hpp src/mathicgb/ChainedHashTable.cpp \
src/mathicgb/ChainedHashTable.hpp src/mathicgb/MonoLookup.hpp \
src/mathicgb/MonoLookup.cpp src/mathicgb/StaticMonoMap.hpp \
src/mathicgb/SigPolyBasis.cpp src/mathicgb/SigPolyBasis.hpp \
- src/mathicgb/HashTourReducer.cpp src/mathicgb/HashTourReducer.hpp \
src/mathicgb/Basis.cpp src/mathicgb/Basis.hpp \
src/mathicgb/io-util.cpp src/mathicgb/io-util.hpp \
src/mathicgb/KoszulQueue.hpp src/mathicgb/MonomialHashTable.hpp \
@@ -28,11 +26,7 @@ libmathicgb_la_SOURCES = src/mathicgb/BjarkeGeobucket2.cpp \
src/mathicgb/PairTriangle.cpp src/mathicgb/PairTriangle.hpp \
src/mathicgb/Poly.cpp src/mathicgb/Poly.hpp \
src/mathicgb/PolyBasis.cpp src/mathicgb/PolyBasis.hpp \
- src/mathicgb/PolyGeoBucket.cpp src/mathicgb/PolyGeoBucket.hpp \
- src/mathicgb/PolyHashReducer.cpp src/mathicgb/PolyHashReducer.hpp \
src/mathicgb/PolyHashTable.cpp src/mathicgb/PolyHashTable.hpp \
- src/mathicgb/PolyHeap.cpp src/mathicgb/PolyHeap.hpp \
- src/mathicgb/PolyReducer.cpp src/mathicgb/PolyReducer.hpp \
src/mathicgb/PolyRing.cpp src/mathicgb/PolyRing.hpp \
src/mathicgb/Reducer.cpp src/mathicgb/Reducer.hpp \
src/mathicgb/ReducerDedup.hpp src/mathicgb/ReducerHash.hpp \
@@ -42,10 +36,9 @@ libmathicgb_la_SOURCES = src/mathicgb/BjarkeGeobucket2.cpp \
src/mathicgb/SignatureGB.hpp src/mathicgb/SigSPairs.cpp \
src/mathicgb/SigSPairs.hpp src/mathicgb/SPairs.cpp \
src/mathicgb/SPairs.hpp src/mathicgb/stdinc.h \
- src/mathicgb/TournamentReducer.cpp \
- src/mathicgb/TournamentReducer.hpp src/mathicgb/SigSPairQueue.hpp \
- src/mathicgb/SigSPairQueue.cpp src/mathicgb/SparseMatrix.hpp \
- src/mathicgb/SparseMatrix.cpp src/mathicgb/QuadMatrixBuilder.hpp \
+ src/mathicgb/SigSPairQueue.hpp src/mathicgb/SigSPairQueue.cpp \
+ src/mathicgb/SparseMatrix.hpp src/mathicgb/SparseMatrix.cpp \
+ src/mathicgb/QuadMatrixBuilder.hpp \
src/mathicgb/QuadMatrixBuilder.cpp src/mathicgb/TypicalReducer.cpp \
src/mathicgb/TypicalReducer.hpp src/mathicgb/F4Reducer.hpp \
src/mathicgb/F4Reducer.cpp src/mathicgb/F4MatrixBuilder.hpp \
diff --git a/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj b/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj
index 8922e0a..eed2994 100755
--- a/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj
+++ b/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj
@@ -452,7 +452,6 @@
<ClCompile Include="..\..\..\src\mathicgb\F4MatrixReducer.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\F4ProtoMatrix.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\F4Reducer.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\HashTourReducer.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\io-util.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\LogDomain.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\LogDomainSet.cpp" />
@@ -461,11 +460,7 @@
<ClCompile Include="..\..\..\src\mathicgb\PairTriangle.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\Poly.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\PolyBasis.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\PolyGeoBucket.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\PolyHashReducer.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\PolyHashTable.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\PolyHeap.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\PolyReducer.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\PolyRing.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\QuadMatrix.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\QuadMatrixBuilder.cpp" />
@@ -477,7 +472,6 @@
<ClCompile Include="..\..\..\src\mathicgb\SigSPairs.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\SPairs.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\SparseMatrix.cpp" />
- <ClCompile Include="..\..\..\src\mathicgb\TournamentReducer.cpp" />
<ClCompile Include="..\..\..\src\mathicgb\TypicalReducer.cpp" />
</ItemGroup>
<ItemGroup>
@@ -496,7 +490,6 @@
<ClInclude Include="..\..\..\src\mathicgb\F4ProtoMatrix.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\F4Reducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\FixedSizeMonomialMap.h" />
- <ClInclude Include="..\..\..\src\mathicgb\HashTourReducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\io-util.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\KoszulQueue.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\LogDomain.hpp" />
@@ -514,11 +507,7 @@
<ClInclude Include="..\..\..\src\mathicgb\PairTriangle.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\Poly.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\PolyBasis.hpp" />
- <ClInclude Include="..\..\..\src\mathicgb\PolyGeoBucket.hpp" />
- <ClInclude Include="..\..\..\src\mathicgb\PolyHashReducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\PolyHashTable.hpp" />
- <ClInclude Include="..\..\..\src\mathicgb\PolyHeap.hpp" />
- <ClInclude Include="..\..\..\src\mathicgb\PolyReducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\PolyRing.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\PrimeField.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\QuadMatrix.hpp" />
@@ -542,7 +531,6 @@
<ClInclude Include="..\..\..\src\mathicgb\SparseMatrix.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\StaticMonoMap.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\stdinc.h" />
- <ClInclude Include="..\..\..\src\mathicgb\TournamentReducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\TypicalReducer.hpp" />
<ClInclude Include="..\..\..\src\mathicgb\Unchar.hpp" />
</ItemGroup>
diff --git a/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj.filters b/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj.filters
index 1f5d561..4a92b2b 100755
--- a/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj.filters
+++ b/build/vs12/mathicgb-lib/mathicgb-lib.vcxproj.filters
@@ -29,9 +29,6 @@
<ClCompile Include="..\..\..\src\mathicgb\F4Reducer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\HashTourReducer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\mathicgb\io-util.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -44,21 +41,9 @@
<ClCompile Include="..\..\..\src\mathicgb\PolyBasis.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\PolyGeoBucket.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\PolyHashReducer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\mathicgb\PolyHashTable.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\PolyHeap.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\PolyReducer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\mathicgb\PolyRing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -86,9 +71,6 @@
<ClCompile Include="..\..\..\src\mathicgb\SparseMatrix.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\mathicgb\TournamentReducer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\mathicgb\TypicalReducer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -151,9 +133,6 @@
<ClInclude Include="..\..\..\src\mathicgb\F4Reducer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\HashTourReducer.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\mathicgb\io-util.hpp">
<Filter>Header Files</Filter>
</ClInclude>
@@ -172,21 +151,9 @@
<ClInclude Include="..\..\..\src\mathicgb\PolyBasis.hpp">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\PolyGeoBucket.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\PolyHashReducer.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\mathicgb\PolyHashTable.hpp">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\PolyHeap.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\PolyReducer.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\mathicgb\PolyRing.hpp">
<Filter>Header Files</Filter>
</ClInclude>
@@ -238,9 +205,6 @@
<ClInclude Include="..\..\..\src\mathicgb\stdinc.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\mathicgb\TournamentReducer.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\mathicgb\TypicalReducer.hpp">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/cli/GBCommonParams.cpp b/src/cli/GBCommonParams.cpp
index 07c4d86..91ecef8 100755
--- a/src/cli/GBCommonParams.cpp
+++ b/src/cli/GBCommonParams.cpp
@@ -4,8 +4,8 @@
#include "GBCommonParams.hpp"
#include "mathicgb/ModuleMonoSet.hpp"
-#include "mathicgb/PolyReducer.hpp"
#include "mathicgb/MonoLookup.hpp"
+#include "mathicgb/Reducer.hpp"
MATHICGB_NAMESPACE_BEGIN
diff --git a/src/mathicgb/BjarkeGeobucket.cpp b/src/mathicgb/BjarkeGeobucket.cpp
deleted file mode 100755
index 0dc0dd7..0000000
--- a/src/mathicgb/BjarkeGeobucket.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "BjarkeGeobucket.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-BjarkeGeobucket::BjarkeGeobucket(const PolyRing *R0)
- : Reducer(),
- R_(R0),
- H_(R0,10),
- mNodeCount(0),
- G_(Configuration(R0,4,1))
-{
-}
-
-BjarkeGeobucket::~BjarkeGeobucket()
-{
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-void BjarkeGeobucket::insertTail(const_term multiplier, const Poly *g1)
-{
- if (g1->nTerms() <= 1) return;
-
- HashPoly M;
- H_.insert(multiplier, ++(g1->begin()), g1->end(), M);
-
- if (!M.empty())
- {
- G_.push(M.begin(),M.end());
- mNodeCount += M.size();
- }
-
- stats_n_inserts++;
- stats_n_compares += G_.getConfiguration().getComparisons();
- G_.getConfiguration().resetComparisons();
-}
-
-void BjarkeGeobucket::insert(monomial multiplier, const Poly *g1)
-{
- HashPoly M;
-
- H_.insert(multiplier, g1->begin(), g1->end(), M);
-
- if (!M.empty())
- {
- G_.push(M.begin(),M.end());
- mNodeCount += M.size();
- }
-
- stats_n_inserts++;
- stats_n_compares += G_.getConfiguration().getComparisons();
- G_.getConfiguration().resetComparisons();
-}
-
-bool BjarkeGeobucket::findLeadTerm(const_term &result)
-{
- while (!G_.empty())
- {
- if (H_.popTerm(G_.top(), result.coeff, result.monom))
- // returns true if G_.top() is not the zero element
- return true;
- G_.pop();
- mNodeCount--;
- }
- return false;
-}
-
-void BjarkeGeobucket::removeLeadTerm()
-// returns true if there is a term to extract
-{
- G_.pop();
- mNodeCount--;
-}
-
-void BjarkeGeobucket::value(Poly &result)
-// keep extracting lead term until done
-{
- const_term t;
- while (findLeadTerm(t))
- {
- result.appendTerm(t.coeff, t.monom);
- G_.pop();
- mNodeCount--;
- }
- resetReducer();
-}
-
-void BjarkeGeobucket::resetReducer()
-{
- const_term t;
- while (findLeadTerm(t))
- {
- G_.pop();
- mNodeCount--;
- }
- H_.reset();
- // how to reset G_ ?
-}
-
-size_t BjarkeGeobucket::getMemoryUse() const
-{
- size_t result = H_.getMemoryUse();
- result += G_.getMemoryUse();
- // std::cerr << "[reducer: " << H_.getMemoryUse() << " " << G_.getMemoryUse() << "]" << std::endl;
- return result;
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/BjarkeGeobucket.hpp b/src/mathicgb/BjarkeGeobucket.hpp
deleted file mode 100755
index 9c46526..0000000
--- a/src/mathicgb/BjarkeGeobucket.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_BJARKE_GEOBUCKET_GUARD
-#define MATHICGB_BJARKE_GEOBUCKET_GUARD
-
-#include "Reducer.hpp"
-#include "PolyHashTable.hpp"
-#include <mathic.h>
-
-MATHICGB_NAMESPACE_BEGIN
-
-template<
- bool TrackFront,
- bool MinBucketBinarySearch,
- bool Deduplicate,
- bool Premerge,
- bool CollectMax,
- int BucketStorage,
- size_t InsertFactor = 1>
-class GeoConfiguration {
-public:
- GeoConfiguration(
- const PolyRing *R0,
- size_t geoBase,
- size_t minBucketSize
- ):
- R(R0), geoBase(geoBase), minBucketSize(minBucketSize), _comparisons(0) {}
-
- const PolyRing *R;
- size_t geoBase;
- size_t minBucketSize;
-
- typedef PolyHashTable::node * Entry;
-
- typedef bool CompareResult;
-
- CompareResult compare(const Entry& a, const Entry& b) const {
- ++_comparisons;
- return R->monomialLT(a->monom, b->monom);
- }
- bool cmpLessThan(CompareResult r) const {return r;}
-
- static const bool supportDeduplication = Deduplicate;
- bool cmpEqual(CompareResult r) const {return r;} // NOT USED IN OUR CASE HERRE!
- Entry deduplicate(const Entry& a, const Entry& /* b */) const {
- MATHICGB_ASSERT(false);
- return a;
- }
-
- size_t getComparisons() const {return _comparisons;}
- void resetComparisons() const {_comparisons = 0;}
-
- static const bool minBucketBinarySearch = MinBucketBinarySearch;
- static const bool trackFront = TrackFront;
- static const bool premerge = Premerge;
- static const bool collectMax = CollectMax;
- static const mic::GeobucketBucketStorage bucketStorage =
- (mic::GeobucketBucketStorage)BucketStorage;
- static const size_t insertFactor = InsertFactor;
-
-private:
- mutable size_t _comparisons;
-};
-
-class BjarkeGeobucket : public Reducer {
-public:
- BjarkeGeobucket(const PolyRing *R);
- ~BjarkeGeobucket();
-
- virtual std::string description() const { return "bjarke geo buckets"; }
-
- void insertTail(const_term multiplier, const Poly *f);
- void insert(monomial multiplier, const Poly *f);
-
- bool findLeadTerm(const_term &result);
- void removeLeadTerm();
-
- void value(Poly &result); // keep extracting lead term until done
-
- size_t getMemoryUse() const;
-
- void dump() const; // Used for debugging
-
-protected:
- void resetReducer();
-
-private:
- void insert(const_term multiplier, Poly::iterator first, Poly::iterator last);
-
- typedef PolyHashTable::MonomialArray HashPoly;
-
- const PolyRing *R_;
- PolyHashTable H_;
-
- size_t mNodeCount; // number of (distinct) monomials in G_
-
- typedef GeoConfiguration<true,true,false,false,false,1,1> Configuration;
- mic::Geobucket< Configuration > G_;
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/BjarkeGeobucket2.cpp b/src/mathicgb/BjarkeGeobucket2.cpp
index 65da925..9bebd1e 100755
--- a/src/mathicgb/BjarkeGeobucket2.cpp
+++ b/src/mathicgb/BjarkeGeobucket2.cpp
@@ -289,7 +289,7 @@ private:
typedef bool CompareResult;
CompareResult compare(const Entry& a, const Entry& b) const {
- return mMonoid.lessThan(a->monom, b->monom);
+ return mMonoid.lessThan(a->mono(), b->mono());
}
bool cmpLessThan(CompareResult r) const {return r;}
diff --git a/src/mathicgb/HashTourReducer.cpp b/src/mathicgb/HashTourReducer.cpp
deleted file mode 100755
index 9a1bd21..0000000
--- a/src/mathicgb/HashTourReducer.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "HashTourReducer.hpp"
-
-#include <utility>
-
-MATHICGB_NAMESPACE_BEGIN
-
-HashTourReducer::HashTourReducer(const PolyRing& ring):
- mRing(ring),
- mLeadTerm(0, mRing.allocMonomial()),
- mLeadTermKnown(false),
- mQueue(Configuration(ring)),
- mHashTable(&ring, 10),
- mPool(sizeof(MultipleWithPos))
-{
-}
-
-class HashTourReducer::MonomialFree
-{
-public:
- MonomialFree(const PolyRing& ring): mRing(ring) {}
-
- bool proceed(MultipleWithPos* entry) {
- entry->destroy(mRing);
- return true;
- }
-private:
- const PolyRing& mRing;
-};
-
-HashTourReducer::~HashTourReducer()
-{
- resetReducer();
- mRing.freeMonomial(mLeadTerm.monom);
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-void HashTourReducer::insertTail(const_term multiple, const Poly* poly)
-{
- MATHICGB_ASSERT(poly != 0);
- MATHICGB_ASSERT(&poly->ring() == &mRing);
- if (poly->nTerms() < 2)
- return;
- MultipleWithPos* entry =
- new (mPool.alloc()) MultipleWithPos(*poly, multiple);
- ++entry->pos;
- insertEntry(entry);
-}
-
-void HashTourReducer::insert(monomial multiple, const Poly* poly)
-{
- MATHICGB_ASSERT(poly != 0);
- MATHICGB_ASSERT(&poly->ring() == &mRing);
- if (poly->isZero())
- return;
- term termMultiple(1, multiple);
- insertEntry(new (mPool.alloc()) MultipleWithPos(*poly, termMultiple));
-}
-
-namespace {
- const_term allocTerm(const PolyRing& ring, const_term term) {
- monomial mono = ring.allocMonomial();
- ring.monomialCopy(term.monom, mono);
- return const_term(term.coeff, mono);
- }
-}
-
-HashTourReducer::MultipleWithPos::MultipleWithPos
-(const Poly& poly, const_term multiple):
- pos(poly.begin()),
- end(poly.end()),
- multiple(allocTerm(poly.ring(), multiple)),
- current(poly.ring().allocMonomial()),
- node(0) {}
-
-void HashTourReducer::MultipleWithPos::
-computeCurrent(const PolyRing& ring, monomial current) {
- ring.monomialMult(multiple.monom, pos.getMonomial(), current);
-}
-
-void HashTourReducer::MultipleWithPos::currentCoefficient
-(const PolyRing& ring, coefficient& coeff) {
- ring.coefficientMult(multiple.coeff, pos.getCoefficient(), coeff);
-}
-
-void HashTourReducer::MultipleWithPos::destroy(const PolyRing& ring) {
- ring.freeMonomial(current);
- ring.freeMonomial(const_cast<ConstMonomial&>(multiple.monom).castAwayConst());
-
- // Call the destructor to destruct the iterators into std::vector.
- // In debug mode MSVC puts those in a linked list and the destructor
- // has to be called since it takes an iterator off the list. We had
- // memory corruption problems before doing this.
- this->~MultipleWithPos();
-}
-
-bool HashTourReducer::leadTerm(const_term& result)
-{
- if (mLeadTermKnown) {
- result = mLeadTerm;
- return true;
- }
-
- do {
- if (mQueue.empty())
- return false;
- MultipleWithPos* entry = mQueue.top();
- MATHICGB_ASSERT(entry != 0);
-
- // remove node from hash table first since we are going to be changing
- // the monomial after this, and if we do that before the hash value will
- // change.
- mHashTable.remove(entry->node);
-
- // extract information into mLeadTerm
- mLeadTerm.monom.swap(entry->current);
- entry->node->monom = entry->current;
- mLeadTerm.coeff = entry->node->coeff;
-
- // remove old monomial from hash table and insert next
- MATHICGB_ASSERT(entry->pos != entry->end);
- while (true) {
- ++entry->pos;
- if (entry->pos == entry->end) {
- mQueue.pop();
- entry->destroy(mRing);
- mPool.free(entry);
- break;
- }
- term t;
- t.monom = entry->current;
- entry->computeCurrent(mRing, t.monom);
- entry->currentCoefficient(mRing, t.coeff);
-
- std::pair<bool, PolyHashTable::node*> p = mHashTable.insert(t);
- if (p.first) {
- entry->node = p.second;
- mQueue.decreaseTop(entry);
- break;
- }
- }
- } while (mRing.coefficientIsZero(mLeadTerm.coeff));
-
- result = mLeadTerm;
- mLeadTermKnown = true;
- return true;
-}
-
-void HashTourReducer::removeLeadTerm()
-{
- if (!mLeadTermKnown) {
- const_term dummy;
- leadTerm(dummy);
- }
- mLeadTermKnown = false;
-}
-
-void HashTourReducer::insertEntry(MultipleWithPos* entry) {
- MATHICGB_ASSERT(entry != 0);
- for (; entry->pos != entry->end; ++entry->pos) {
- term t;
- t.monom = entry->current;
- entry->computeCurrent(mRing, t.monom);
- entry->currentCoefficient(mRing, t.coeff);
-
- std::pair<bool, PolyHashTable::node*> p = mHashTable.insert(t);
- if (p.first) {
- mLeadTermKnown = false;
- entry->node = p.second;
- mQueue.push(entry);
- return;
- }
- }
- entry->destroy(mRing);
- mPool.free(entry);
-}
-
-void HashTourReducer::value(Poly &result)
-{
- const_term t;
- while (leadTerm(t)) {
- result.appendTerm(t.coeff, t.monom);
- removeLeadTerm();
- }
- resetReducer();
-}
-
-void HashTourReducer::resetReducer()
-{
- mLeadTermKnown = false;
- MonomialFree freeer(mRing);
- mQueue.forAll(freeer);
- mQueue.clear();
- mHashTable.reset();
-}
-
-size_t HashTourReducer::getMemoryUse() const
-{
- return
- TypicalReducer::getMemoryUse() +
- mQueue.getMemoryUse() +
- mPool.getMemoryUse() +
- mHashTable.getMemoryUse();
-}
-
-void HashTourReducer::dump() const
-{
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/HashTourReducer.hpp b/src/mathicgb/HashTourReducer.hpp
deleted file mode 100755
index 234bad9..0000000
--- a/src/mathicgb/HashTourReducer.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_HASH_TOUR_REDUCER_GUARD
-#define MATHICGB_HASH_TOUR_REDUCER_GUARD
-
-#include "TypicalReducer.hpp"
-#include "PolyHashTable.hpp"
-#include <mathic.h>
-#include <memtailor.h>
-
-MATHICGB_NAMESPACE_BEGIN
-
-class HashTourReducer : public TypicalReducer {
-public:
- HashTourReducer(const PolyRing& R);
- virtual ~HashTourReducer();
-
- virtual std::string description() const {
- return "hashed tournament tree reducer";
- }
-
- virtual void insertTail(const_term multiplier, const Poly *f);
- virtual void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term& result);
- virtual void removeLeadTerm();
-
- virtual void value(Poly &result); // keep extracting lead term until done
-
- virtual size_t getMemoryUse() const;
-
- virtual void dump() const; // Used for debugging
-
-protected:
- virtual void resetReducer();
-
-private:
- // Represents a term multiple of a polynomial,
- // together with a current term of the multiple.
- struct MultipleWithPos {
- MultipleWithPos(const Poly& poly, const_term multiple);
-
- Poly::const_iterator pos;
- Poly::const_iterator const end;
- const_term const multiple;
- monomial current; // multiple.monom * pos.getMonomial()
- PolyHashTable::node* node;
-
- void computeCurrent(const PolyRing& ring, monomial current);
- void currentCoefficient(const PolyRing& ring, coefficient& coeff);
- void destroy(const PolyRing& ring);
- };
-
- class Configuration {
- public:
- typedef MultipleWithPos* Entry;
-
- Configuration(const PolyRing& ring) : mRing(ring) {}
-
- typedef bool CompareResult;
- CompareResult compare(const Entry& a, const Entry& b) const {
- return mRing.monomialLT(a->current, b->current);
- }
- bool cmpLessThan(CompareResult r) const {return r;}
-
- static const bool fastIndex = true;
-
- private:
- const PolyRing& mRing;
- };
-
- class MonomialFree;
-
- void insertEntry(MultipleWithPos* entry);
- void insert(const_term multiplier, Poly::iterator first, Poly::iterator last);
-
- const PolyRing& mRing;
- term mLeadTerm;
- bool mLeadTermKnown;
- mic::TourTree<Configuration> mQueue;
- PolyHashTable mHashTable;
- memt::BufferPool mPool;
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/PolyGeoBucket.cpp b/src/mathicgb/PolyGeoBucket.cpp
deleted file mode 100755
index 10d95a0..0000000
--- a/src/mathicgb/PolyGeoBucket.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "PolyGeoBucket.hpp"
-
-#include <mathic.h>
-
-MATHICGB_NAMESPACE_BEGIN
-
-const size_t heap_size[GEOHEAP_SIZE] = {4, 16, 64, 256, 1024, 4096,
- 16384, 65536, 262144, 1048576, 4194304,
- 16777216, 67108864, 268435456,
- 1073741824};
-
-PolyGeoBucket::PolyGeoBucket(const PolyRing *R0):
- R(R0), top_of_heap(-1), lead(-1)
-{
- int i;
- for (i=0; i<GEOHEAP_SIZE; i++)
- {
- heap[i].poly = 0;
- // the iterators are NOT VALID if this poly is the null value
- }
-}
-
-PolyGeoBucket::~PolyGeoBucket()
-{
- resetReducer();
-}
-
-///////////////////////////////////////
-// Helper routines ////////////////////
-///////////////////////////////////////
-
-void PolyGeoBucket::add_to(heap_record &a, heap_record &b)
-// handles the case when a.poly == 0 too
-// If the result is 0, then a.poly is set to 0.
-{
- assert(b.poly != 0);
- assert(b.first != b.last);
- if (a.poly == 0)
- {
- a = b;
- b.poly = 0;
- }
- else
- {
- size_t ncmps;
- Poly *g = Poly::add(R, a.first, a.last, b.first, b.last, ncmps);
- stats_n_inserts++;
- delete a.poly;
- a.poly = 0;
- stats_n_compares += ncmps;
- if (g->isZero())
- {
- delete g;
- }
- else
- {
- a.poly = g;
- a.first = g->begin();
- a.last = g->end();
- }
- delete b.poly;
- b.poly = 0;
- }
-}
-
-void PolyGeoBucket::update_size_stats()
-{
- size_t size_polys = 0;
- size_t size_live = 0;
- for (int i = 0; i<= top_of_heap; i++)
- {
- if (heap[i].poly == 0) continue;
- size_polys += heap[i].poly->nTerms();
- size_live += heap[i].last - heap[i].first;
- }
- if (size_polys > stats_maxsize)
- stats_maxsize = size_polys;
- if(size_live >= stats_maxsize_live)
- stats_maxsize_live = size_live;
-}
-void PolyGeoBucket::insert(heap_record &a)
-{
- // Takes the heap_record, and adds it into one of the heap elems
- // If the size changes, then this continues until the heap
- // sizes are valid
-
- lead = -1;
- size_t len = a.last - a.first;
- int i= 0;
- while (len >= heap_size[i]) i++;
-
- add_to(heap[i], a);
- if (heap[i].poly != 0)
- {
- len = heap[i].last - heap[i].first;
- while (len >= heap_size[i])
- {
- i++;
-
- add_to(heap[i], heap[i-1]);
- if (heap[i].poly == 0) break;
- len = heap[i].last - heap[i].first;
- }
- }
- if (i > top_of_heap) {
- top_of_heap = i;
- if (i >= GEOHEAP_SIZE)
- mic::reportInternalError("Too many levels in PolyGeoBucket.");
- }
-
- stats_n_inserts++;
- update_size_stats();
-}
-
-bool PolyGeoBucket::computeLeadTerm()
-// returns true if the heap does not add to 0
-{
- int lead_so_far = -1;
- for (int i=0; i <= top_of_heap; i++)
- {
- if (heap[i].poly == 0) continue;
- if (lead_so_far < 0)
- {
- lead_so_far = i;
- continue;
- }
- int cmp = R->monomialCompare(heap[lead_so_far].first.getMonomial(), heap[i].first.getMonomial());
- stats_n_compares++;
- if (cmp == GT) continue;
- if (cmp == LT)
- {
- lead_so_far = i;
- continue;
- }
- // At this point we have equality
- R->coefficientAddTo(heap[lead_so_far].first.getCoefficient(), heap[i].first.getCoefficient());
- // now increment one of these
- ++heap[i].first;
- if (heap[i].first == heap[i].last)
- {
- delete heap[i].poly;
- heap[i].poly = 0;
- }
- if (R->coefficientIsZero(heap[lead_so_far].first.getCoefficient()))
- {
- ++heap[lead_so_far].first;
- if (heap[lead_so_far].first == heap[lead_so_far].last)
- {
- delete heap[lead_so_far].poly;
- heap[lead_so_far].poly = 0;
- }
- lead_so_far = -1;
- i = -1;
- }
- }
- lead = lead_so_far;
- return (lead_so_far >= 0);
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-
-void PolyGeoBucket::insertTail(const_term multiplier, const Poly *f)
-{
- if (f->nTerms() <= 1) return;
- Poly *g = f->copy();
- g->multByTerm(multiplier.coeff, multiplier.monom);
- heap_record a;
- a.poly = g;
- a.first = g->begin();
- ++a.first;
- a.last = g->end();
- insert(a);
-}
-
-void PolyGeoBucket::insert(monomial multiplier, const Poly *f)
-{
- Poly *g = f->copy();
- g->multByMonomial(multiplier);
- heap_record a;
- a.poly = g;
- a.first = g->begin();
- a.last = g->end();
- insert(a);
-}
-
-bool PolyGeoBucket::leadTerm(const_term &result)
-{
- if (lead == -1 && !computeLeadTerm()) return false;
- result.coeff = heap[lead].first.getCoefficient();
- result.monom = heap[lead].first.getMonomial();
- return true;
-}
-
-void PolyGeoBucket::removeLeadTerm()
-// returns true if there is a term to extract
-{
- if (lead == -1 && !computeLeadTerm()) return;
- ++heap[lead].first;
- if (heap[lead].first == heap[lead].last)
- {
- // We are at the end here, so free poly, and set poly to 0.
- delete heap[lead].poly;
- heap[lead].poly = 0;
- lead = -1;
- return;
- }
- lead = -1;
-}
-
-void PolyGeoBucket::value(Poly &result)
-// keep extracting lead term until done
-{
- heap_record a;
- a.poly = 0;
- for (int i=0; i<=top_of_heap; i++)
- {
- if (heap[i].poly == 0) continue;
- add_to(a, heap[i]);
- }
- top_of_heap = -1;
- if (a.poly != 0)
- {
- result.append(a.first, a.last);
- delete a.poly;
- a.poly = 0;
- }
-}
-
-void PolyGeoBucket::resetReducer()
-{
- for (int i=0; i<=top_of_heap; i++)
- {
- if (heap[i].poly != 0)
- {
- delete heap[i].poly;
- heap[i].poly = 0;
- }
- }
- top_of_heap = -1;
- lead = -1;
-}
-
-size_t PolyGeoBucket::getMemoryUse() const
-{
- // size includes: each poly in the heap, as well as the
- // size of the heap itself
- size_t result =
- TypicalReducer::getMemoryUse() +
- sizeof(heap_record) * GEOHEAP_SIZE;
- for (int i=0; i<GEOHEAP_SIZE; ++i)
- if (heap[i].poly != 0)
- result += heap[i].poly->getMemoryUse();
- return result;
-}
-
-void PolyGeoBucket::dump() const
-{
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/PolyGeoBucket.hpp b/src/mathicgb/PolyGeoBucket.hpp
deleted file mode 100755
index 97de1e3..0000000
--- a/src/mathicgb/PolyGeoBucket.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_POLY_GEO_BUCKET_GUARD
-#define MATHICGB_POLY_GEO_BUCKET_GUARD
-
-#include "TypicalReducer.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-/// @todo: shouldn't be a macro
-#define GEOHEAP_SIZE 15
-
-class PolyGeoBucket : public TypicalReducer {
-public:
- PolyGeoBucket(const PolyRing *R);
- ~PolyGeoBucket();
-
- virtual std::string description() const { return "geo buckets"; }
-
- void insertTail(const_term multiplier, const Poly *f);
- void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term& result);
- virtual void removeLeadTerm();
-
- void value(Poly &result); // keep extracting lead term until done
- void resetReducer();
-
- void dump() const; // Used for debugging
-
- size_t getMemoryUse() const;
-
-private:
- void insert(const_term multiplier, Poly::iterator first, Poly::iterator last);
-
- struct heap_record {
- Poly *poly;
- Poly::iterator first;
- Poly::iterator last;
- };
-
- void add_to(heap_record &a, heap_record &b);
- // sets a to a+b, sets b to 0.
-
-private:
- const PolyRing *R;
- heap_record heap[GEOHEAP_SIZE];
- int top_of_heap;
- int lead; // where the lead monomial is located (i.e. heap[lead]). = -1 means not known.
-
- void insert(heap_record &a);
- bool computeLeadTerm();
- void update_size_stats();
-
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/PolyHashReducer.cpp b/src/mathicgb/PolyHashReducer.cpp
deleted file mode 100755
index ccecebc..0000000
--- a/src/mathicgb/PolyHashReducer.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "PolyHashReducer.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-PolyHashReducer::PolyHashReducer(const PolyRing *R0):
- R_(R0), H_(R0,15)
-{
- f_ = new HashPoly;
- f_iter_ = f_->begin();
-}
-
-PolyHashReducer::~PolyHashReducer()
-{
- delete f_;
- f_ = 0;
-}
-
-void PolyHashReducer::merge(const HashPoly::const_iterator &fbegin, const HashPoly::const_iterator &fend,
- const HashPoly::const_iterator &gbegin, const HashPoly::const_iterator &gend,
- HashPoly &result,
- size_t &n_compares)
-{
- HashPoly::const_iterator f = fbegin;
- HashPoly::const_iterator g = gbegin;
-
- n_compares = 0;
-
- if (f == fend)
- result.insert(result.end(), g, gend);
- else if (g == gend)
- result.insert(result.end(), f, fend);
- else {
- bool done = false;
- while (!done) {
- int cmp = R_->monomialCompare((*f)->monom, (*g)->monom);
- n_compares++;
- MATHICGB_ASSERT(cmp != EQ);
- if (cmp == LT) {
- result.push_back(*g);
- ++g;
- if (g == gend)
- {
- result.insert(result.end(), f, fend);
- done = true;
- }
- } else {
- MATHICGB_ASSERT(cmp == GT);
- result.push_back(*f);
- ++f;
- if (f == fend) {
- result.insert(result.end(), g, gend);
- done = true;
- }
- }
- }
- }
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-
-void PolyHashReducer::insertTail(const_term multiplier, const Poly *g1)
-{
- size_t ncmps = 0;
-
- if (g1->nTerms() <= 1) return;
-
- HashPoly M;
- // Poly *g = g1->copy(); //MES: ONLY COPY THE TAIL!!
- // g->multByTerm(multiplier.coeff, multiplier.monom);
- // H_.fromPoly(*g, M);
-
- H_.insert(multiplier, ++(g1->begin()), g1->end(), M);
-
- if (!M.empty())
- {
- HashPoly h;
- merge(f_iter_, f_->end(), M.begin(), M.end(), h, ncmps);
- swap(*f_, h);
- f_iter_ = f_->begin();
- }
-
- stats_n_compares += ncmps;
- stats_n_inserts++;
- // delete g;
-}
-
-void PolyHashReducer::insert(monomial multiplier, const Poly *g1)
-{
- size_t ncmps = 0;
-
- // Poly *g = g1->copy();
- // g->multByMonomial(multiplier);
-
- HashPoly M;
- // H_.fromPoly(*g, M);
-
- H_.insert(multiplier, g1->begin(), g1->end(), M);
-
- HashPoly h;
- merge(f_iter_, f_->end(), M.begin(), M.end(), h, ncmps);
- stats_n_compares += ncmps;
- stats_n_inserts++;
-
- // delete g;
- swap(*f_, h);
- f_iter_ = f_->begin();
-}
-
-bool PolyHashReducer::leadTerm(const_term &result)
-{
- while (f_iter_ != f_->end())
- {
- if (H_.popTerm(*f_iter_, result.coeff, result.monom))
- // returns true *f_iter is not the zero element
- return true;
- ++f_iter_;
- }
- return false;
-}
-
-void PolyHashReducer::removeLeadTerm()
-// returns true if there is a term to extract
-{
- if (f_iter_ == f_->end()) return;
- ++f_iter_;
-}
-
-void PolyHashReducer::value(Poly &result)
-// keep extracting lead term until done
-{
- const_term t;
- for ( ; f_iter_ != f_->end(); ++f_iter_)
- if (leadTerm(t))
- result.appendTerm(t.coeff, t.monom);
- resetReducer();
-}
-
-size_t PolyHashReducer::getMemoryUse() const
-{
- return
- TypicalReducer::getMemoryUse() +
- H_.getMemoryUse() +
- f_->capacity() * sizeof(PolyHashTable::node *);
-}
-
-void PolyHashReducer::resetReducer()
-{
- const_term t;
- for ( ; f_iter_ != f_->end(); ++f_iter_)
- leadTerm(t);
-
- delete f_;
- f_ = new HashPoly;
- f_iter_ = f_->begin();
-
- H_.reset();
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/PolyHashReducer.hpp b/src/mathicgb/PolyHashReducer.hpp
deleted file mode 100755
index 9178304..0000000
--- a/src/mathicgb/PolyHashReducer.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_POLY_HASH_REDUCER_GUARD
-#define MATHICGB_POLY_HASH_REDUCER_GUARD
-
-#include "TypicalReducer.hpp"
-#include "PolyHashTable.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-class PolyHashReducer : public TypicalReducer {
-public:
- PolyHashReducer(const PolyRing *R);
-
- virtual ~PolyHashReducer();
-
- virtual std::string description() const { return "poly hash reducer"; }
-
- void insertTail(const_term multiplier, const Poly *f);
- void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term &result);
- virtual void removeLeadTerm();
-
- void value(Poly &result); // keep extracting lead term until done
-
- virtual size_t getMemoryUse() const;
-
-protected:
- virtual void resetReducer();
-
-private:
- void insert(const_term multiplier, Poly::const_iterator first, Poly::const_iterator last);
-
- typedef PolyHashTable::MonomialArray HashPoly;
-
- void merge(
- const HashPoly::const_iterator &fbegin,
- const HashPoly::const_iterator &fend,
- const HashPoly::const_iterator &gbegin,
- const HashPoly::const_iterator &gend,
- HashPoly &result,
- size_t &n_compares);
-
- const PolyRing* R_;
- HashPoly* f_;
- HashPoly::iterator f_iter_;
-
- PolyHashTable H_;
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/PolyHashTable.cpp b/src/mathicgb/PolyHashTable.cpp
index 46f81bf..d111b19 100755
--- a/src/mathicgb/PolyHashTable.cpp
+++ b/src/mathicgb/PolyHashTable.cpp
@@ -70,8 +70,8 @@ void PolyHashTable::resize(size_t new_nbits)
while (p != 0)
{
node *q = p;
- p = p->next;
- q->next = 0;
+ p = p->next();
+ q->next() = 0;
// Reinsert node. We know that it is unique
const_monomial m = q->monom;
size_t hashval = mRing.monomialHashValue(m) & mHashMask;
@@ -79,14 +79,14 @@ void PolyHashTable::resize(size_t new_nbits)
if (r == 0)
{
mBinCount++;
- q->next = r;
+ q->next() = r;
mHashTable[hashval] = q;
}
else
{
// put it at the end
- for ( ; r->next != 0; r = r->next) { }
- r->next = q;
+ for ( ; r->next() != 0; r = r->next()) { }
+ r->next() = q;
}
}
}
@@ -101,7 +101,7 @@ PolyHashTable::node * PolyHashTable::makeNode(coefficient coeff, const_monomial
{
mNodeCount++;
node *q = static_cast<node *>(mArena.allocObjectNoCon<node>());
- q->next = 0;
+ q->next() = 0;
q->monom = monom;
mRing.coefficientSet(q->coeff, coeff);
return q;
@@ -125,12 +125,12 @@ bool PolyHashTable::lookup_and_insert(const_monomial m, coefficient val, node *&
result = tmpNode;
return true;
}
- if (tmpNode->next == 0) {
+ if (tmpNode->next() == 0) {
result = makeNode(val, m);
- tmpNode->next = result;
+ tmpNode->next() = result;
break;
}
- tmpNode = tmpNode->next;
+ tmpNode = tmpNode->next();
}
}
@@ -211,11 +211,11 @@ void PolyHashTable::unlink(node* p)
node head;
node* tmpNode = mHashTable[hashval];
- head.next = tmpNode;
- for (node* q = &head; q->next != 0; q = q->next) {
- if (q->next == p) {
- q->next = p->next;
- mHashTable[hashval] = head.next;
+ head.next() = tmpNode;
+ for (node* q = &head; q->next() != 0; q = q->next()) {
+ if (q->next() == p) {
+ q->next() = p->next();
+ mHashTable[hashval] = head.next();
return;
}
}
diff --git a/src/mathicgb/PolyHashTable.hpp b/src/mathicgb/PolyHashTable.hpp
index 2fd0b51..9c4127f 100755
--- a/src/mathicgb/PolyHashTable.hpp
+++ b/src/mathicgb/PolyHashTable.hpp
@@ -22,11 +22,33 @@ MATHICGB_NAMESPACE_BEGIN
// Does not take ownership of any of the monomials.
class PolyHashTable {
public:
- struct node {
- node *next;
+ typedef PolyRing::Monoid Monoid;
+ typedef Monoid::MonoRef MonoRef;
+ typedef Monoid::ConstMonoRef ConstMonoRef;
+ typedef Monoid::MonoPtr MonoPtr;
+ typedef Monoid::ConstMonoPtr ConstMonoPtr;
+ typedef coefficient Value;
+
+ class Node {
+ public:
+
+ const_monomial& mono() {return monom;}
+ const const_monomial& mono() const {return monom;}
+
+ Value& value() {return coeff;}
+ const Value& value() const {return coeff;}
+
+ private:
+ friend class PolyHashTable;
+
+ Node*& next() {return mNext;}
+ Node* next() const {return mNext;}
+
+ Node* mNext;
coefficient coeff;
const_monomial monom;
};
+ typedef Node node; // todo: remove
typedef std::vector<node*> MonomialArray;
diff --git a/src/mathicgb/PolyHeap.cpp b/src/mathicgb/PolyHeap.cpp
deleted file mode 100755
index ccf8c45..0000000
--- a/src/mathicgb/PolyHeap.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "PolyHeap.hpp"
-
-#include <iostream>
-#include <algorithm>
-
-MATHICGB_NAMESPACE_BEGIN
-
-size_t PolyHeap::stats_static_n_compares = 0;
-
-PolyHeap::PolyHeap(const PolyRing *R_):
- R(R_), heapCompare(R_), lead_is_computed(false)
-{
- stats_static_n_compares = 0;
-}
-
-void PolyHeap::insert(const_term multiplier, Poly::const_iterator first, Poly::const_iterator last)
-{
- if (first == last) return;
- heap_term t;
- t.multiplier = multiplier;
- t.first = first;
- t.last = last;
- t.actual = R->allocMonomial(mArena);
- R->monomialMult(multiplier.monom, t.first.getMonomial(), t.actual);
- terms_.push_back(t);
- std::push_heap(terms_.begin(), terms_.end(), heapCompare);
- stats_n_compares += stats_static_n_compares;
- stats_static_n_compares = 0;
- if (terms_.size() > stats_maxsize)
- stats_maxsize = terms_.size();
- stats_n_inserts++;
-}
-
-void PolyHeap::insertTail(const_term multiplier, const Poly *f)
-{
- if (tracingLevel > 100) {
- std::cerr << "PolyHeap inserting tail of ";
- f->display(std::cerr);
- std::cerr << std::endl;
- std::cerr << "multiplied by: " << multiplier.coeff << " * ";
- R->monomialDisplay(std::cerr, multiplier.monom);
- std::cerr << std::endl;
- }
-
- Poly::const_iterator a = f->begin();
- insert(multiplier, ++a, f->end());
-}
-void PolyHeap::insert(monomial multiplier, const Poly *f)
-{
- const_term t;
- t.monom = multiplier;
- R->coefficientSetOne(t.coeff);
- Poly::const_iterator a = f->begin();
- insert(t, a, f->end());
-}
-
-void PolyHeap::extract1(const_term &t)
-{
- // Pop the largest term into t, incrememnt that poly iterator
- std::pop_heap(terms_.begin(), terms_.end(), heapCompare);
- stats_n_compares += stats_static_n_compares;
- stats_static_n_compares = 0;
- heap_term h = *(terms_.rbegin());
- t.monom = h.actual;
- t.coeff = h.multiplier.coeff;
- R->coefficientMultTo(t.coeff, h.first.getCoefficient());
- terms_.pop_back(); // removes h from heap
- ++h.first;
- if (h.first != h.last)
- insert(h.multiplier, h.first, h.last);
- else {
- // REMOVE h.multiplier
- }
-}
-
-bool PolyHeap::extractLeadTerm(const_term &result)
-{
- bool result_set = false;
- for (;;) {
- if (terms_.empty()) break;
- if (!result_set)
- {
- extract1(result);
- result_set = true;
- continue;
- }
- heap_term &h = terms_[0]; // Now look at the next term
- if (!R->monomialEQ(h.actual, result.monom)) break;
- // at this point, we need to grab the monomial
- const_term t;
- extract1(t);
- R->coefficientAddTo(result.coeff, t.coeff);
- result_set = !(R->coefficientIsZero(result.coeff));
- }
- return result_set;
-}
-
-bool PolyHeap::computeLeadTerm()
-{
- if (!lead_is_computed)
- {
- for (;;) {
- if (terms_.empty()) break;
- if (!lead_is_computed)
- {
- extract1(lead_term);
- lead_is_computed = true;
- continue;
- }
- heap_term &h = terms_[0]; // Now look at the next term
- if (!R->monomialEQ(h.actual, lead_term.monom)) break;
- // at this point, we need to grab the monomial
- const_term t;
- extract1(t);
- R->coefficientAddTo(lead_term.coeff, t.coeff);
- lead_is_computed = !(R->coefficientIsZero(lead_term.coeff));
- }
- }
- return lead_is_computed; // will be false if could not compute
-}
-
-bool PolyHeap::leadTerm(const_term &result)
-{
- if (!lead_is_computed && !computeLeadTerm()) return false;
- result = lead_term;
- return true;
-}
-
-void PolyHeap::removeLeadTerm()
-{
- if (!lead_is_computed) computeLeadTerm();
- lead_is_computed = false;
-}
-
-void PolyHeap::value(Poly &result)
-{
- const_term t;
- while (leadTerm(t))
- {
- result.appendTerm(t.coeff, t.monom);
- lead_is_computed = false;
- }
- resetReducer();
-}
-
-size_t PolyHeap::getMemoryUse() const
-{
- return
- TypicalReducer::getMemoryUse() +
- terms_.capacity() * sizeof(heap_term);
-}
-
-void PolyHeap::resetReducer()
-{
- terms_.resize(0);
- lead_is_computed = false;
-}
-
-void PolyHeap::dump() const
-// display debugging info about the heap
-{
- std::cout << "-- polyheap --" << std::endl;
- for (size_t i = 0; i < terms_.size(); i++)
- {
- std::cout << "actual: ";
- R->monomialDisplay(std::cout, terms_[i].actual);
-
- std::cout << " monom: ";
- R->monomialDisplay(std::cout, terms_[i].multiplier.monom);
-
- std::cout << " coeff: " << terms_[i].multiplier.coeff ;
- std::cout << std::endl;
- }
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/PolyHeap.hpp b/src/mathicgb/PolyHeap.hpp
deleted file mode 100755
index a17c32e..0000000
--- a/src/mathicgb/PolyHeap.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_POLY_HEAP_GUARD
-#define MATHICGB_POLY_HEAP_GUARD
-
-#include "TypicalReducer.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-struct heap_term {
- monomial actual; // multiplier * *first
- const_term multiplier;
- Poly::const_iterator first;
- Poly::const_iterator last;
-};
-
-class heapCompareFcn {
- const PolyRing *R;
-public:
- heapCompareFcn(const PolyRing *R0) : R(R0) {}
- bool operator()(heap_term &a, heap_term &b);
-};
-
-class PolyHeap : public TypicalReducer {
-public:
- PolyHeap(const PolyRing *R);
- ~PolyHeap() {}
-
- virtual std::string description() const { return "heap"; }
-
- void insertTail(const_term multiplier, const Poly *f);
- void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term& result);
- virtual void removeLeadTerm();
-
- void value(Poly &result); // keep extracting lead term until done
- void dump() const;
-
- static size_t stats_static_n_compares; // static so that heap compares can be easily counted
-
- void insert(const_term multiplier, Poly::const_iterator first, Poly::const_iterator last);
-
- size_t getMemoryUse() const;
-
-protected:
- void resetReducer();
-
-private:
- bool extractLeadTerm(const_term &result);
- // returns true if there is a term to extract
-
- const PolyRing *R;
- heapCompareFcn heapCompare;
- std::vector<heap_term> terms_; // the actual heap
-
- bool lead_is_computed;
- const_term lead_term; // if it has been computed, this will be set.
- // monomial points somewhere into 'monoms'.
-
- void extract1(const_term &t); // assumes: heap is not empty
- bool computeLeadTerm();
-};
-
-inline bool heapCompareFcn::operator()(heap_term &a, heap_term &b)
-{
- PolyHeap::stats_static_n_compares++;
- return R->monomialLT(a.actual, b.actual);
-}
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/PolyReducer.cpp b/src/mathicgb/PolyReducer.cpp
deleted file mode 100755
index 5f37ae4..0000000
--- a/src/mathicgb/PolyReducer.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "PolyReducer.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-PolyReducer::PolyReducer(const PolyRing *R0):
- R(R0), mMemUsage(0)
-{
- f = new Poly(*R);
- f_iter = f->begin();
-}
-
-PolyReducer::~PolyReducer()
-{
- delete f;
- f = 0;
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-
-void PolyReducer::insertTail(const_term multiplier, const Poly *g1)
-{
- size_t ncmps = 0;
-
- if (g1->nTerms() <= 1) return;
- Poly *g = g1->copy();
- g->multByTerm(multiplier.coeff, multiplier.monom);
-
- Poly::iterator ig = g->begin();
- ++ig;
- Poly *h = Poly::add(R, f_iter, f->end(), ig, g->end(), ncmps);
- stats_n_compares += ncmps;
- stats_n_inserts++;
-
- delete f;
- delete g;
- f = h;
- f_iter = f->begin();
-
- size_t fmem = f->getMemoryUse();
- if (fmem > mMemUsage)
- mMemUsage = fmem;
-}
-
-void PolyReducer::insert(monomial multiplier, const Poly *g1)
-{
- size_t ncmps = 0;
-
- Poly *g = g1->copy();
- g->multByMonomial(multiplier);
-
- Poly::iterator ig = g->begin();
- Poly *h = Poly::add(R, f_iter, f->end(), ig, g->end(), ncmps);
- stats_n_compares += ncmps;
- stats_n_inserts++;
-
- delete f;
- delete g;
- f = h;
- f_iter = f->begin();
-
- size_t fmem = f->getMemoryUse();
- if (fmem > mMemUsage)
- mMemUsage = fmem;
-}
-
-bool PolyReducer::leadTerm(const_term &result)
-{
- if (f_iter != f->end())
- {
- result.coeff = f_iter.getCoefficient();
- result.monom = f_iter.getMonomial();
- return true;
- }
- return false;
-}
-
-void PolyReducer::removeLeadTerm()
-// returns true if there is a term to extract
-{
- if (f_iter == f->end()) return;
- ++f_iter;
-}
-
-void PolyReducer::value(Poly &result)
-// keep extracting lead term until done
-{
- Poly::iterator fend = f->end();
- result.append(f_iter, fend);
- delete f;
- f = new Poly(*R);
- f_iter = f->begin();
-}
-
-void PolyReducer::resetReducer()
-{
- delete f;
- f = new Poly(*R);
- f_iter = f->begin();
-}
-
-void PolyReducer::dump() const
-{
-}
-
-size_t PolyReducer::getMemoryUse() const {
- return mMemUsage;
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/PolyReducer.hpp b/src/mathicgb/PolyReducer.hpp
deleted file mode 100755
index d09450c..0000000
--- a/src/mathicgb/PolyReducer.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_POLY_REDUCER_GUARD
-#define MATHICGB_POLY_REDUCER_GUARD
-
-#include "TypicalReducer.hpp"
-
-MATHICGB_NAMESPACE_BEGIN
-
-class PolyReducer : public TypicalReducer {
-public:
- PolyReducer(const PolyRing *R);
-
- virtual ~PolyReducer();
-
- virtual std::string description() const { return "poly reducer"; }
-
- void insertTail(const_term multiplier, const Poly *f);
- void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term& result);
- virtual void removeLeadTerm();
-
- void value(Poly &result); // keep extracting lead term until done
- void dump() const;
-
- virtual size_t getMemoryUse() const;
-
-protected:
- void resetReducer();
-
-private:
- void insert(const_term multiplier, Poly::const_iterator first, Poly::const_iterator last);
-
- const PolyRing *R;
- Poly *f;
- Poly::iterator f_iter;
-
- size_t mMemUsage;
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/Reducer.cpp b/src/mathicgb/Reducer.cpp
index 6bd2d2d..f0af4ef 100755
--- a/src/mathicgb/Reducer.cpp
+++ b/src/mathicgb/Reducer.cpp
@@ -3,13 +3,7 @@
#include "stdinc.h"
#include "Reducer.hpp"
-#include "PolyHeap.hpp"
-#include "PolyGeoBucket.hpp"
-#include "PolyReducer.hpp"
-#include "PolyHashReducer.hpp"
#include "BjarkeGeobucket2.hpp"
-#include "TournamentReducer.hpp"
-#include "HashTourReducer.hpp"
#include "ReducerPack.hpp"
#include "ReducerPackDedup.hpp"
#include "ReducerNoDedup.hpp"
@@ -51,20 +45,8 @@ std::unique_ptr<Reducer> Reducer::makeReducerNullOnUnknown(
PolyRing const& ring
) {
switch (type) {
- case Reducer_PolyHeap:
- return std::unique_ptr<Reducer>(new PolyHeap(&ring));
- case Reducer_PolyGeoBucket:
- return std::unique_ptr<Reducer>(new PolyGeoBucket(&ring));
- case Reducer_Poly:
- return std::unique_ptr<Reducer>(new PolyReducer(&ring));
- case Reducer_PolyHash:
- return std::unique_ptr<Reducer>(new PolyHashReducer(&ring));
case Reducer_BjarkeGeo:
return makeBjarkeGeobucket2(ring);
- case Reducer_TournamentTree:
- return std::unique_ptr<Reducer>(new TournamentReducer(ring));
- case Reducer_HashTourTree:
- return std::unique_ptr<Reducer>(new HashTourReducer(ring));
case Reducer_TourTree_NoDedup:
return std::unique_ptr<Reducer>(new ReducerNoDedup<mic::TourTree>(ring));
@@ -119,13 +101,7 @@ std::unique_ptr<Reducer> Reducer::makeReducerNullOnUnknown(
Reducer::ReducerType Reducer::reducerType(int typ)
{
switch (typ) {
- case 0: return Reducer_PolyHeap;
- case 1: return Reducer_PolyGeoBucket;
- case 2: return Reducer_Poly;
- case 3: return Reducer_PolyHash;
case 4: return Reducer_BjarkeGeo;
- case 5: return Reducer_TournamentTree;
- case 6: return Reducer_HashTourTree;
case 7: return Reducer_TourTree_NoDedup;
case 8: return Reducer_TourTree_Dedup;
@@ -151,7 +127,7 @@ Reducer::ReducerType Reducer::reducerType(int typ)
case 25: return Reducer_F4_Old;
case 26: return Reducer_F4_New;
- default: return Reducer_PolyHeap;
+ default: return Reducer_BjarkeGeo;
}
}
diff --git a/src/mathicgb/Reducer.hpp b/src/mathicgb/Reducer.hpp
index ddb21f0..ca3efb7 100755
--- a/src/mathicgb/Reducer.hpp
+++ b/src/mathicgb/Reducer.hpp
@@ -78,15 +78,9 @@ public:
// ***** Kinds of reducers and creating a Reducer
enum ReducerType {
- Reducer_PolyHeap,
- Reducer_PolyGeoBucket,
- Reducer_Poly,
- Reducer_PolyHash,
- Reducer_BjarkeGeo, // uses hash table on front to remove duplicates
- Reducer_TournamentTree,
- Reducer_HashTourTree,
-
- Reducer_TourTree_NoDedup,
+ Reducer_BjarkeGeo = 4, // uses hash table on front to remove duplicates
+
+ Reducer_TourTree_NoDedup = 7,
Reducer_TourTree_Dedup,
Reducer_TourTree_Hashed,
Reducer_TourTree_NoDedup_Packed,
diff --git a/src/mathicgb/ReducerHash.hpp b/src/mathicgb/ReducerHash.hpp
index e8032d2..0568535 100755
--- a/src/mathicgb/ReducerHash.hpp
+++ b/src/mathicgb/ReducerHash.hpp
@@ -41,7 +41,7 @@ public:
Configuration(const PolyRing& ring): PlainConfiguration(ring) {}
CompareResult compare(const Entry& a, const Entry& b) const {
- return ring().monomialLT(a->monom, b->monom);
+ return ring().monomialLT(a->mono(), b->mono());
}
};
diff --git a/src/mathicgb/ReducerHashPack.hpp b/src/mathicgb/ReducerHashPack.hpp
index c965a94..2563126 100755
--- a/src/mathicgb/ReducerHashPack.hpp
+++ b/src/mathicgb/ReducerHashPack.hpp
@@ -193,8 +193,8 @@ bool ReducerHashPack<Q>::leadTerm(const_term& result)
// extract information into mLeadTerm
mLeadTerm.monom.swap(entry->current);
- entry->node->monom = entry->current;
- mLeadTerm.coeff = entry->node->coeff;
+ entry->node->mono() = entry->current;
+ mLeadTerm.coeff = entry->node->value();
// remove old monomial from hash table and insert next
MATHICGB_ASSERT(entry->pos != entry->end);
diff --git a/src/mathicgb/SignatureGB.cpp b/src/mathicgb/SignatureGB.cpp
index 597c3f0..73e0599 100755
--- a/src/mathicgb/SignatureGB.cpp
+++ b/src/mathicgb/SignatureGB.cpp
@@ -6,7 +6,6 @@
#include "Basis.hpp"
#include "MonoLookup.hpp"
#include "SigSPairs.hpp"
-#include "PolyHeap.hpp"
#include "ModuleMonoSet.hpp"
#include "LogDomain.hpp"
#include <mathic.h>
diff --git a/src/mathicgb/TournamentReducer.cpp b/src/mathicgb/TournamentReducer.cpp
deleted file mode 100755
index 2add261..0000000
--- a/src/mathicgb/TournamentReducer.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#include "stdinc.h"
-#include "TournamentReducer.hpp"
-
-#include <utility>
-
-MATHICGB_NAMESPACE_BEGIN
-
-TournamentReducer::TournamentReducer(const PolyRing& ring):
- mRing(ring),
- mLeadTerm(0, mRing.allocMonomial()),
- mLeadTermKnown(false),
- mQueue(Configuration(ring)),
- mPool(sizeof(MultipleWithPos))
-{
-}
-
-class TournamentReducer::MonomialFree
-{
-public:
- MonomialFree(const PolyRing& ring): mRing(ring) {}
-
- bool proceed(MultipleWithPos* entry)
- {
- entry->destroy(mRing);
- return true;
- }
-private:
- const PolyRing& mRing;
-};
-
-TournamentReducer::~TournamentReducer()
-{
- resetReducer();
- mRing.freeMonomial(mLeadTerm.monom);
-}
-
-///////////////////////////////////////
-// External interface routines ////////
-///////////////////////////////////////
-void TournamentReducer::insertTail(const_term multiple, const Poly* poly)
-{
- if (poly->nTerms() <= 1)
- return;
- mLeadTermKnown = false;
-
- MultipleWithPos* entry = new (mPool.alloc()) MultipleWithPos(*poly, multiple);
- ++entry->pos;
- entry->computeCurrent(poly->ring());
- mQueue.push(entry);
-}
-
-void TournamentReducer::insert(monomial multiple, const Poly* poly)
-{
- if (poly->isZero())
- return;
- mLeadTermKnown = false;
-
- term termMultiple(1, multiple);
- MultipleWithPos* entry = new (mPool.alloc()) MultipleWithPos(*poly, termMultiple);
- entry->computeCurrent(poly->ring());
- mQueue.push(entry);
-}
-
-namespace {
- const_term allocTerm(const PolyRing& ring, const_term term) {
- monomial mono = ring.allocMonomial();
- ring.monomialCopy(term.monom, mono);
- return const_term(term.coeff, mono);
- }
-}
-
-TournamentReducer::MultipleWithPos::MultipleWithPos
-(const Poly& poly, const_term multiple):
- pos(poly.begin()),
- end(poly.end()),
- multiple(allocTerm(poly.ring(), multiple)),
- current(poly.ring().allocMonomial()) {}
-
-void TournamentReducer::MultipleWithPos::computeCurrent(const PolyRing& ring) {
- ring.monomialMult(multiple.monom, pos.getMonomial(), current);
-}
-
-void TournamentReducer::MultipleWithPos::currentCoefficient
-(const PolyRing& ring, coefficient& coeff) {
- ring.coefficientMult(multiple.coeff, pos.getCoefficient(), coeff);
-}
-
-void TournamentReducer::MultipleWithPos::destroy(const PolyRing& ring) {
- ring.freeMonomial(current);
- ring.freeMonomial(const_cast<ConstMonomial&>(multiple.monom).castAwayConst());
-
- // Call the destructor to destruct the iterators into std::vector.
- // In debug mode MSVC puts those in a linked list and the destructor
- // has to be called since it takes an iterator off the list. We had
- // memory corruption problems before doing this.
- this->~MultipleWithPos();
-}
-
-bool TournamentReducer::leadTerm(const_term& result)
-{
- if (mLeadTermKnown) {
- result = mLeadTerm;
- return true;
- }
-
- do {
- if (mQueue.empty())
- return false;
- MultipleWithPos* entry = mQueue.top();
- mLeadTerm.monom.swap(entry->current);
- entry->currentCoefficient(mRing, mLeadTerm.coeff);
-
- while (true) {
- ++entry->pos;
- if (entry->pos == entry->end) {
- mQueue.pop();
- entry->destroy(mRing);
- mPool.free(entry);
- } else {
- entry->computeCurrent(mRing);
- mQueue.decreaseTop(entry);
- }
-
- if (mQueue.empty())
- break;
-
- entry = mQueue.top();
- if (!mRing.monomialEQ(entry->current, mLeadTerm.monom))
- break;
- coefficient coeff;
- entry->currentCoefficient(mRing, coeff);
- mRing.coefficientAddTo(mLeadTerm.coeff, const_cast<const coefficient&>(coeff));
- }
- } while (mRing.coefficientIsZero(mLeadTerm.coeff));
-
- result = mLeadTerm;
- mLeadTermKnown = true;
- return true;
-}
-
-void TournamentReducer::removeLeadTerm()
-{
- if (!mLeadTermKnown) {
- const_term dummy;
- leadTerm(dummy);
- }
- mLeadTermKnown = false;
-}
-
-void TournamentReducer::value(Poly &result)
-{
- const_term t;
- while (leadTerm(t)) {
- result.appendTerm(t.coeff, t.monom);
- removeLeadTerm();
- }
- resetReducer();
-}
-
-void TournamentReducer::resetReducer()
-{
- MonomialFree freeer(mRing);
- mQueue.forAll(freeer);
- mQueue.clear();
-}
-
-size_t TournamentReducer::getMemoryUse() const
-{
- return
- TypicalReducer::getMemoryUse() +
- mQueue.getMemoryUse() +
- mPool.getMemoryUse();
-}
-
-void TournamentReducer::dump() const
-{
-}
-
-MATHICGB_NAMESPACE_END
diff --git a/src/mathicgb/TournamentReducer.hpp b/src/mathicgb/TournamentReducer.hpp
deleted file mode 100755
index b8de07c..0000000
--- a/src/mathicgb/TournamentReducer.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
-// NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
-#ifndef MATHICGB_TOURNAMENT_REDUCER_GUARD
-#define MATHICGB_TOURNAMENT_REDUCER_GUARD
-
-#include "TypicalReducer.hpp"
-#include <mathic.h>
-#include <memtailor.h>
-
-MATHICGB_NAMESPACE_BEGIN
-
-class TournamentReducer : public TypicalReducer {
-public:
- TournamentReducer(const PolyRing& R);
- virtual ~TournamentReducer();
-
- virtual std::string description() const { return "tournament tree reducer"; }
-
- virtual void insertTail(const_term multiplier, const Poly *f);
- virtual void insert(monomial multiplier, const Poly *f);
-
- virtual bool leadTerm(const_term &result);
- virtual void removeLeadTerm();
-
- virtual void value(Poly &result); // keep extracting lead term until done
-
- virtual size_t getMemoryUse() const;
-
- virtual void dump() const; // Used for debugging
-
-protected:
- virtual void resetReducer();
-
-private:
- // Represents a term multiple of a polynomial,
- // together with a current term of the multiple.
- struct MultipleWithPos {
- MultipleWithPos(const Poly& poly, const_term multiple);
-
- Poly::const_iterator pos;
- Poly::const_iterator const end;
- const_term const multiple;
- monomial current; // multiple.monom * pos.getMonomial()
-
- void computeCurrent(const PolyRing& ring);
- void currentCoefficient(const PolyRing& ring, coefficient& coeff);
- void destroy(const PolyRing& ring);
- };
-
- class Configuration {
- public:
- typedef MultipleWithPos* Entry;
-
- Configuration(const PolyRing& ring) : mRing(ring) {}
-
- typedef bool CompareResult;
- CompareResult compare(const Entry& a, const Entry& b) const {
- return mRing.monomialLT(a->current, b->current);
- }
- bool cmpLessThan(CompareResult r) const {return r;}
-
- static const bool fastIndex = true;
-
- private:
- const PolyRing& mRing;
- };
-
- class MonomialFree;
-
- void insert(const_term multiplier, Poly::iterator first, Poly::iterator last);
-
- const PolyRing& mRing;
- term mLeadTerm;
- bool mLeadTermKnown;
- mic::TourTree<Configuration> mQueue;
- memt::BufferPool mPool;
-};
-
-MATHICGB_NAMESPACE_END
-#endif
diff --git a/src/mathicgb/io-util.cpp b/src/mathicgb/io-util.cpp
index 76c59ff..33936e9 100755
--- a/src/mathicgb/io-util.cpp
+++ b/src/mathicgb/io-util.cpp
@@ -8,8 +8,6 @@
#include "io-util.hpp"
#include "Scanner.hpp"
#include "MathicIO.hpp"
-#include "PolyHeap.hpp"
-#include "PolyGeoBucket.hpp"
#include "SigPolyBasis.hpp"
#include "SignatureGB.hpp"
#include "Basis.hpp"
diff --git a/src/test/gb-test.cpp b/src/test/gb-test.cpp
index 5bc3629..273a5bd 100755
--- a/src/test/gb-test.cpp
+++ b/src/test/gb-test.cpp
@@ -6,7 +6,6 @@
#include "mathicgb/Basis.hpp"
#include "mathicgb/ModuleMonoSet.hpp"
#include "mathicgb/io-util.hpp"
-#include "mathicgb/PolyHeap.hpp"
#include "mathicgb/SigPolyBasis.hpp"
#include "mathicgb/SignatureGB.hpp"
#include "mathicgb/ClassicGBAlg.hpp"
@@ -52,144 +51,114 @@ void testGB(
#define MATHICGB_ESCAPE_MULTILINE_STRING(str) #str
char const allPairsTests[] = MATHICGB_ESCAPE_MULTILINE_STRING(
spairQueue reducerType divLookup monTable buchberger postponeKoszul useBaseDivisors autoTailReduce autoTopReduce preferSparseReducers useSingularCriterionEarly sPairGroupSize threadCount
-1 11 3 1 0 0 0 0 0 0 0 1 1
-2 8 1 2 0 1 1 0 0 1 1 1 2
-0 3 2 3 1 0 0 1 1 1 0 100 8
-3 23 4 4 0 1 1 0 0 0 1 100 1
-0 0 2 3 0 0 1 0 0 0 1 2 8
-3 24 1 2 1 0 0 1 1 0 0 100 2
-2 3 3 1 0 1 0 0 0 1 1 10 1
-2 16 4 4 1 0 0 1 1 0 0 10 8
-1 5 3 1 1 0 0 1 1 1 0 100 1
-1 14 2 4 1 0 0 1 0 1 0 100 2
-3 0 4 3 1 0 0 0 1 1 0 10 2
-3 18 3 2 1 0 0 0 1 0 0 100 8
-1 20 1 3 1 0 0 0 1 1 0 100 1
-3 16 2 2 1 0 0 1 0 1 0 2 1
-0 23 1 1 1 0 0 1 1 1 0 2 2
-1 6 4 1 1 0 0 0 1 1 0 100 8
-0 23 3 3 1 0 0 1 1 0 0 1 8
-1 1 1 2 1 0 0 0 1 0 0 10 8
-0 8 3 4 1 0 0 1 1 0 0 2 1
-3 2 2 1 1 0 0 0 1 0 0 10 8
-1 11 4 3 0 1 1 0 0 1 1 2 8
-0 13 3 1 0 1 1 0 0 1 0 10 2
-3 1 2 4 0 1 1 0 0 1 1 1 2
-0 22 4 2 1 0 0 1 1 0 0 10 8
-2 6 2 3 0 1 1 0 0 0 1 2 2
-2 18 1 4 0 1 1 0 0 1 1 10 1
-2 21 1 2 1 0 0 1 1 1 0 0 1
-1 26 4 4 1 0 0 1 0 0 0 1 2
-1 24 2 1 0 1 1 0 0 1 1 0 8
-0 20 4 4 0 1 1 0 0 0 1 0 2
-0 10 1 3 0 0 1 0 0 0 1 10 1
-3 6 1 4 0 1 0 0 0 0 1 1 1
-3 11 2 3 0 0 0 0 0 0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 0 0 1 0 0 0 1 1
+1 18 1 1 0 0 0 0 0 0 1 1 8
+1 26 2 4 1 0 0 0 1 0 0 10 8
+3 11 1 2 0 1 0 0 0 0 0 10 8
+1 9 1 2 0 1 1 0 0 0 1 100 8
+3 19 4 4 1 0 0 1 0 0 0 100 8
+3 11 2 3 0 0 0 0 0 0 1 100 1
+3 9 2 3 1 0 0 1 1 1 0 2 2
+0 9 3 4 1 0 0 0 1 0 0 10 1
+0 4 2 1 1 0 0 0 1 1 0 0 1
+0 13 3 2 1 0 0 1 1 0 0 100 8
+3 7 1 4 0 1 0 0 0 1 1 100 8
+1 22 4 4 1 0 0 0 1 1 0 0 2
+3 24 2 4 1 0 0 1 0 0 0 100 1
+0 20 3 1 0 1 1 0 0 0 1 0 1
+1 25 3 1 1 0 0 1 0 0 0 2 2
+2 10 3 1 0 1 0 0 0 1 1 0 1
+2 4 2 1 0 0 0 0 0 0 1 100 8
+0 17 4 3 0 0 1 0 0 1 1 100 8
+1 9 2 3 1 0 0 1 0 0 0 0 2
+0 8 4 2 1 0 0 1 1 0 0 1 8
+2 7 2 1 1 0 0 1 0 0 0 2 8
+2 23 4 4 0 1 1 0 0 0 1 100 2
+1 26 3 4 1 0 0 0 0 0 0 1 8
);
std::istringstream tests(allPairsTests);
// skip the initial line with the parameter names.
diff --git a/src/test/pict.in b/src/test/pict.in
index f471341..15e9089 100755
--- a/src/test/pict.in
+++ b/src/test/pict.in
@@ -23,7 +23,7 @@
# This is the PICT model specifying all parameters and their values
#
spairQueue: 0,1,2,3
-reducerType: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
+reducerType: 4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
divLookup: 1, 2, 3, 4
monTable: 1, 2, 3, 4
buchberger: 0, 1
diff --git a/src/test/poly-test.cpp b/src/test/poly-test.cpp
index d80d974..7cd2c52 100755
--- a/src/test/poly-test.cpp
+++ b/src/test/poly-test.cpp
@@ -7,9 +7,6 @@
#include "mathicgb/ModuleMonoSet.hpp"
#include "mathicgb/io-util.hpp"
#include "mathicgb/MonomialHashTable.hpp"
-#include "mathicgb/PolyHashTable.hpp"
-#include "mathicgb/PolyHeap.hpp"
-#include "mathicgb/PolyGeoBucket.hpp"
#include "mathicgb/SigPolyBasis.hpp"
#include "mathicgb/SignatureGB.hpp"
#include <gtest/gtest.h>
--
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