Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Dixon (dense) refacto" #219

Merged
merged 1 commit into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ examples/data/Makefile
doc/Makefile
linbox/Makefile
linbox/algorithms/Makefile
linbox/algorithms/dixon-solver/Makefile
linbox/algorithms/gauss/Makefile
linbox/algorithms/matrix-blas3/Makefile
linbox/algorithms/opencl-kernels/Makefile
Expand Down
2 changes: 1 addition & 1 deletion examples/solver/t-rdisolve.C
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ int test()
cout<<"' and Z/pZ of type '";
F.write(cout)<<"'"<<endl;

typedef DixonSolver<Ring, Field, class RandomPrime, Method::DenseElimination> QSolver;
typedef RationalSolver<Ring, Field, class RandomPrime, Method::Dixon> QSolver;
typedef DiophantineSolver<QSolver> ZSolver;

//typedef std::vector<std::pair<RingElement, RingElement> > FractionVector;
Expand Down
3 changes: 2 additions & 1 deletion linbox/algorithms/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

pkgincludesubdir=$(pkgincludedir)/algorithms

SUBDIRS=dixon-solver gauss opencl-kernels matrix-blas3 polynomial-matrix
SUBDIRS=gauss opencl-kernels matrix-blas3 polynomial-matrix
# IML

noinst_LTLIBRARIES=libalgorithms.la
Expand Down Expand Up @@ -127,6 +127,7 @@ pkgincludesub_HEADERS = \
rational-reconstruction2.h \
rational-reconstruction-base.h \
rational-reconstruction.h \
rational-solver2.h \
rational-solver-adaptive.h \
rational-solver.h \
rational-solver.inl \
Expand Down
4 changes: 2 additions & 2 deletions linbox/algorithms/det-rational.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ namespace LinBox
Integer lif = 1;
if ((s1 > 4*s2) && (!term)){
//cout << "lif " << std::flush;
DixonSolver < Givaro::IntegerDom , Givaro::Modular<double>, PrimeIterator<IteratorCategories::HeuristicTag>, Method::DenseElimination > RSolver;
LastInvariantFactor < Givaro::IntegerDom ,DixonSolver < Givaro::IntegerDom, Givaro::Modular<double>, PrimeIterator<IteratorCategories::HeuristicTag>, Method::DenseElimination > > LIF(RSolver);
RationalSolver < Givaro::IntegerDom , Givaro::Modular<double>, PrimeIterator<IteratorCategories::HeuristicTag>, Method::Dixon > RSolver;
LastInvariantFactor < Givaro::IntegerDom ,RationalSolver < Givaro::IntegerDom, Givaro::Modular<double>, PrimeIterator<IteratorCategories::HeuristicTag>, Method::Dixon > > LIF(RSolver);
IVect r_num2 (Z,Atilde. coldim());
t1.clear();
t1.start();
Expand Down
17 changes: 2 additions & 15 deletions linbox/algorithms/diophantine-solver.inl
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,7 @@ namespace LinBox
SolverReturnStatus status;

//this should eliminate all inconsistent systems; when level == SL_MONTECARLO maybe not.
Method::Dixon method;
method.certifyMinimalDenominator = (level >= SL_LASVEGAS);
method.certifyInconsistency = (level >= SL_LASVEGAS);
method.singularSolutionType = SingularSolutionType::Random;
method.trialsBeforeFailure = maxPrimes;

status = _rationalSolver.monolithicSolve(x, den, A, b, method);
status = _rationalSolver.monolithicSolve(x, den, A, b, (level >= SL_LASVEGAS), true, maxPrimes, level);
if (status != SS_OK) {
if (status == SS_FAILED && maxPrimes > 2)
std::cout << "ERROR, failed to find original solution and maxPrimes is not too small!" << std::endl;
Expand Down Expand Up @@ -119,14 +113,7 @@ namespace LinBox
int boredom = 0; //used in monte carlo, when we assume there's a diophantine solution
while (! _ring.areEqual(upperDenBound, lowerDenBound)) {
_rationalSolver.chooseNewPrime();

Method::Dixon method;
method.certifyMinimalDenominator = (level >= SL_LASVEGAS);
method.certifyInconsistency = (level >= SL_LASVEGAS);
method.singularSolutionType = SingularSolutionType::Random;
method.trialsBeforeFailure = 1;

status = _rationalSolver.monolithicSolve(x, den, A, b, method);
status = _rationalSolver.monolithicSolve(x, den, A, b, (level >= SL_LASVEGAS), true, 1, level);
numSolutionsNeeded++;
#ifdef DEBUG_DIO
std::cout << '.' ;
Expand Down
26 changes: 0 additions & 26 deletions linbox/algorithms/dixon-solver/Makefile.am

This file was deleted.

Loading