Project

General

Profile

Design #1750

IdealOfPoints: allow duplicate points?

Added by John Abbott 10 months ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Improving
Target version:
Start date:
03 Jul 2023
Due date:
% Done:

20%

Estimated time:
Spent time:

Description

In a recent email a user (puwu) reported a "bug" in CoCoA.
The supplied program wanted to compute IdealOfPoints of a list which was generated automatically, and which contained duplicate points.
Currently the code checks for duplicates, and throws en error if any are found.
Should duplicate points be allowed?
Perhaps a "boolean" option requesting that duplicate points be accepted?
Discuss, decide, & implement if nec.

History

#1 Updated by John Abbott 10 months ago

If we decide to permit duplicate points, implementation should be conceptually very easy... just tedious.
And don't forget to update the doc!

#2 Updated by John Abbott 3 months ago

Should we implement this? Or postpone it? Or reject it?
What is most natural?

Is it really a mistake to ask for IdealOfPoints(R, [[1,0],[1,0]])?

#3 Updated by Anna Maria Bigatti 3 months ago

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

I'm more inclined to suggest IdealOfPoints(R, MakeSet(pts)) in the manual, if one wants to allow duplicates. Maybe we could also write it in the error message.

#4 Updated by John Abbott 3 months ago

  • Assignee set to John Abbott
  • % Done changed from 10 to 20

The CoCoA-5 manual already says that the points must be distinct (as a quick reaction to the problem reported by puwu).
I have just improved the error messages slightly: previously said Duplicate points now says Points must be distinct.

The source code is in SparsePolyOps-ideal-points.C It is mostly ancient code, originally in C, which needs to be cleaned up considerably!!

#5 Updated by John Abbott 3 months ago

MakeSet is OK for CoCoA-5 and affine points. In CoCoALib/C++ and/or with projective points it is not so simple.
Anna pointed out that our functions already effectively make the input distinct when doing the checking, so we could
make that code accessible to the caller.... or offer the possibility for the user to make a call allowing duplicate points.

#6 Updated by John Abbott about 2 months ago

After on-line discussion... Anna suggests: (either-or)
  • (A) make 2 fns: one which allows duplicate points, and one which does not
  • (B) make 2 new fns for users: RemoveDuplicateAffinePoints and RemoveDuplicateProjectivePoints (names need improvement)

#7 Updated by John Abbott about 2 months ago

  • Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880

Also available in: Atom PDF