Project

General

Profile

Support #1761

MakeTermOrdMat: improve error mesg

Added by John Abbott 9 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Improving
Target version:
Start date:
06 Aug 2023
Due date:
% Done:

100%

Estimated time:
0.99 h
Spent time:

Description

The fn MakeTermOrdMat should give a better error mesg if the input matrix is not non-negative:

/**/ W := RowMat([1,0,-1,1]);
/**/ MakeTermOrdMat(W);
--> ERROR: Ordering must be a term-ordering (i.e. all indets>1)
--> [CoCoALib] MakeTermOrdMat
--> /**/ MakeTermOrdMat(W);
-->      ^^^^^^^^^^^^^^^^^


Related issues

Related to CoCoALib - Bug #1789: GradingMat with negative weights should complain (or deal with them properly!!)Closed2024-03-12

History

#1 Updated by John Abbott 9 months ago

Source code is in MatrixForOrdering.C
I do wonder if the call to MakeNonNeg is safe: why is the loop on line 133 safe (couldn't PosRow go out of bounds?)

UPDATE the problem with PosRow possibly going out of bounds has been "resolved" by adding a comment that it is assumed that there are no zero cols

#2 Updated by John Abbott 7 months ago

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

Now the behaviour is as follows:

/**/ W := RowMat([1,0,-1,1]);
/**/ MakeTermOrdMat(W);
--> ERROR: Topmost non-zero entry in each col must be positive
--> [CoCoALib] MakeTermOrdMat
--> /**/ MakeTermOrdMat(W);
-->      ^^^^^^^^^^^^^^^^^

Is this Good enough?

#3 Updated by John Abbott 3 months ago

  • Subject changed from MakTermOrdMat: improve error mesg to MakeTermOrdMat: improve error mesg

#4 Updated by Anna Maria Bigatti 3 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 10 to 60

#5 Updated by John Abbott about 1 month ago

  • Related to Bug #1789: GradingMat with negative weights should complain (or deal with them properly!!) added

#6 Updated by John Abbott about 1 month ago

  • Status changed from Feedback to Closed
  • Assignee set to John Abbott
  • % Done changed from 60 to 100
  • Estimated time set to 0.99 h

Also available in: Atom PDF