Project

General

Profile

Design #825

IsPositiveGrading -- really need 2 signatures?

Added by John Abbott over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tidying
Target version:
Start date:
26 Nov 2015
Due date:
% Done:

100%

Estimated time:
0.88 h
Spent time:

Description

The fn IsPositiveGrading has 2 signatures:
IsPositiveGrading(M) and
IsPositiveGrading(M,GrDim)

Do we really need the second form?

The second seems potentially superfluous; it is equivalent to
IsPositiveGrading(submat(M,1..GrDim,AllCols))

Of course specifying 1..GrDim in C++ is not so easy -- CoCoALib offers LongRange.
Also specifying AllCols is even longer: LongRange(0, NumCols(M)-1).


Related issues

Related to CoCoALib - Feature #1209: New function: HasPositiveGradingClosed2018-08-03

Related to CoCoALib - Design #64: submat takes only vector<long>Closed2011-12-15

History

#1 Updated by John Abbott over 8 years ago

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

What is the difference between IsTermOrdering and IsPositiveGrading?

One allows a zero-column, the other not?

#2 Updated by Lorenzo Robbiano over 8 years ago

John Abbott wrote:

What is the difference between IsTermOrdering and IsPositiveGrading?

One allows a zero-column, the other not?

None accepts the zero columnn and Anna says that the implementation should be identical.
Indeed the second form is equivalent to what you said.

#3 Updated by John Abbott over 8 years ago

Just to clarify the semantics:
  • IsPositiveGrading accepts a matrix of integers (error if entries are not integers), returns true iff there is no zero col, and first non-zero entry in each col is positive, and rank = NumRows
  • IsTermOrdering accepts a square matrix of integers then effectively calls IsPositiveGrading on it

Am I right?

#4 Updated by Lorenzo Robbiano over 8 years ago

John Abbott wrote:

Just to clarify the semantics:
  • IsPositiveGrading accepts a matrix of integers (error if entries are not integers), returns true iff there is no zero col, and first non-zero entry in each col is positive, and rank = NumRows
  • IsTermOrdering accepts a square matrix of integers then effectively calls IsPositiveGrading on it

Am I right?

Yes, you are.

#5 Updated by Anna Maria Bigatti over 8 years ago

  • % Done changed from 10 to 50

-- fixed test anna.cocoa5
-- updated CoCoA-5 manual
-- made suggestion for submat ;-)

#6 Updated by John Abbott almost 6 years ago

  • Status changed from In Progress to Closed
  • Assignee set to John Abbott
  • Target version changed from CoCoALib-1.0 to CoCoALib-0.99600
  • % Done changed from 50 to 100
  • Estimated time set to 0.88 h

SUMMARY: we have removed the version of IsPositiveGrading which took 2 args
(nobody seemed to need it, except perhaps inside the impl of IsTermOrdering)

#7 Updated by Anna Maria Bigatti almost 5 years ago

  • Related to Feature #1209: New function: HasPositiveGrading added

#8 Updated by Anna Maria Bigatti almost 5 years ago

  • Related to Design #64: submat takes only vector<long> added

Also available in: Atom PDF