Project

General

Profile

Slug #1068

PolyRing constructor: NewOrdvArith computed twice

Added by Anna Maria Bigatti almost 7 years ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
enhancing/improving
Target version:
Start date:
17 May 2017
Due date:
% Done:

10%

Estimated time:
Spent time:

Description

We never considered that a slow ring constructor could be a problem, but may be.
In particular this bit of code:

  RingDistrMPolyInlFpPPImpl::RingDistrMPolyInlFpPPImpl(const ring& R, const std::vector<symbol>& IndetNames, const PPOrdering& ord):
    myCoeffRingValue(R),
    myInlineCoeffImplValue(ConvertTo<long>(characteristic(R))),
    myPPMValue(NewPPMonoidOv(IndetNames, ord)),
    myOrdvArith(NewOrdvArith(ord)),

computes NewOrdvArith twice, the first one in NewPPMonoidOv.


Related issues

Related to CoCoALib - Slug #1057: Slug: Polynomial ring contructor slow with (big) matrix orderingIn Progress2017-05-04

Related to CoCoALib - Bug #1641: gcd does not recognize univariate input Closed2021-12-20

History

#1 Updated by Anna Maria Bigatti almost 7 years ago

  • Related to Slug #1057: Slug: Polynomial ring contructor slow with (big) matrix ordering added

#2 Updated by Anna Maria Bigatti almost 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

It would be handy to get the OrdvArith from a PPMonoid (if possible).
This could also be used internally by the GBasis-like operations, which recreate their own rings with the same ordering as the ring of the input.
(this might speed up GroebnerFan in the case of easy but many GBs)

#3 Updated by Anna Maria Bigatti almost 7 years ago

Anna Maria Bigatti wrote:

It would be handy to get the OrdvArith from a PPMonoid (if possible).

If John allows me ;-) I implement it, and test if this solves all ring contructor slugs.

#4 Updated by John Abbott almost 7 years ago

OK, Anna; take a look.
I'm a bit busy with other things right now.

#5 Updated by Anna Maria Bigatti about 1 month ago

  • Related to Bug #1641: gcd does not recognize univariate input added

#6 Updated by Anna Maria Bigatti about 1 month ago

I added some verbosity

/**/ SetVerbosityLevel(99);
/**/ P := NewPolyRingWeights(QQ, "x,y,z", RowMat([1,2,3]));
   [D1,L99,NewOrdvArith(ord)]  -- called --
    [D2,L99,MatrixOrdering32bitImpl ctor]  -- called --
   [D1,L99,PPMonoidOvImpl(syms,ord)]  -- called --
   [D1,L99,NewOrdvArith(ord)]  -- called --
    [D2,L99,MatrixOrdering32bitImpl ctor]  -- called --

Also available in: Atom PDF