Feature #384
IsZero for matrix
Description
The built-in fn IsZero
works for many types (INT, RAT, RINGELEM, MODULEELEM
and IDEAL
).
Should it work for matrices (type MAT
) too?
However I do not think it should be applicable to LIST
.
Related issues
History
#1 Updated by Anna Maria Bigatti about 10 years ago
- Category set to Incomplete function
- Target version set to CoCoA-5.1.0 Easter14
I think we should have IsZero for MAT
#2 Updated by Anna Maria Bigatti about 10 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
I tried implementing it in a clever way but got stuck.
(clever = ZeroImpl gives true, IdentityImpl gives false, ...)
But I had a brilliant(?) idea: should we just implement IsZero
as return M = ZeroMat(R, NR, NC)
and let the equality test to be clever? (I think it is clever)
#3 Updated by Anna Maria Bigatti about 10 years ago
- Assignee set to Anna Maria Bigatti
- % Done changed from 10 to 50
- Estimated time set to 2.50 h
Implemented as described above.
Seems to work (added test IsZero(ZeroMat(R, 12345,67890))
and is fast).
But where should the implementation go? matrix.C or MatrixViews.C?
Now the prototype is in matrix.H and the implementation in MatrixViews.C...
#4 Updated by Anna Maria Bigatti about 10 years ago
Added to cocoa-5
I had to add evalArgAsT1orT2orT3orT4orT5orT6orT7 in Interpreter.H.
#5 Updated by John Abbott about 10 years ago
JAA suggests putting it in MatrixOperations
#6 Updated by Anna Maria Bigatti about 10 years ago
John Abbott wrote:
JAA suggests putting it in
MatrixOperations
OK. Should we also move IsZeroRow/Col?
#7 Updated by Anna Maria Bigatti about 10 years ago
- % Done changed from 50 to 80
JAA suggests putting it in MatrixOperations
(after talking about it on the phone) moved all Is.. functions from matrix.C to MatrixOperation.
#8 Updated by John Abbott about 10 years ago
- Status changed from In Progress to Feedback
- % Done changed from 80 to 90
#9 Updated by John Abbott almost 10 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
Implemented, documented, tested.
Closing..