Design #825
IsPositiveGrading -- really need 2 signatures?
Description
The fn IsPositiveGrading
has 2 signatures:IsPositiveGrading(M)
andIsPositiveGrading(M,GrDim)
Do we really need the second form?
The second seems potentially superfluous; it is equivalent toIsPositiveGrading(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
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
andIsPositiveGrading
?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
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 callsIsPositiveGrading
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 callsIsPositiveGrading
on itAm 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