Feature #124
change long args in matrices into MachineInt (?)
Description
For "public" functions (not member functions) like
void SetEntry(MatrixView& M, long i, long j, const BigInt& N)
should we have instead
void SetEntry(MatrixView& M, MachineInt i, MachineInt j, const BigInt& N)
?
Related issues
History
#1 Updated by John Abbott about 12 years ago
The args being considered are "indices"; we should be consistent regarding all sorts of index (well, at least non-negative index).
Here are some examples:- matrix row/column
- indet in a
PolyRing
orPPMonoid
- component in a module
- argument to operator[] in any context (??)
Even though the permitted values may often be non-negative, we should not use any unsigned integral type.
#2 Updated by John Abbott almost 11 years ago
- Category set to Safety
- Status changed from New to Rejected
- Assignee set to John Abbott
- Target version set to CoCoALib-0.9953
- % Done changed from 0 to 100
I am rejecting this task since it is effectively covered by #89 which deals with indices in general; and it seems simplest to regard matrix row/col indices as a specific case of general indices. I believe it would be odd to handle matrix indices differently from other ones.
#3 Updated by John Abbott over 7 years ago
- Related to Design #925: MachineInt or long for args which are indices (yet again) added