"Randomize" and "Randomized" obsolete?
While looking through the CoCoA-5 on-line manual, I noticed that there are references to
These CoCoA-4 functions have not been ported to CoCoA-5; should we do so, or should we regard them as obsolete?
My preference is to regard them obsolete.
#1 Updated by John Abbott 10 months ago
- Project changed from CoCoALib to CoCoA-5
- Category deleted (
- Status changed from New to In Progress
- Target version deleted (
- % Done changed from 0 to 10
The old CoCoA-4 function
Randomize(F) is essentially equivalent to:
sum([random(-CoeffMax, CoeffMax)*t | t in support(F)]);
CoeffMaxis some value (perhaps 2^31?). The vagueness about the value of
CoeffMaxis one reason I prefer to make these fns obsolete.
Randomize(F) is the same as
F := Randomized(F);
If we do decide to make them obsolete then any "see also" references in the manual should be removed.
We could also use my implementations above to define them in
Comments? Other ideas?
#2 Updated by Anna Maria Bigatti 10 months ago
- Target version set to CoCoA-5.2.2
I sometimes miss old
I suggest implementing it, but with explicit range:
randomized(f, 100); randomizes in the range -100..100.
and maybe also
randomized(f, 100, 200); in the range 100..200.
(should work for polynomials and for matrices?)
#3 Updated by John Abbott 10 months ago
- Category set to CoCoA-4 function to be added
Randomize in CoCoA-4 would work only for polynomials (and integers). Did it also work for matrices?
KISS: I do not like
Randomize(f, 100,200) and find it hard to imagine when it could be useful.
If we do keep
Randomize but with a different interface then the old is still obsolete/obsolescent.
#8 Updated by John Abbott 10 months ago
There is also an undocumented fn called
Should it be made obsolete? Or simply eliminated?
NOTE I should have checked before writing. There is also an exported fn called
BackwardCompatible.cpkg5, and there may be a call to it in
regularity.cpkg5. I can easily change the call into a call to
But what about
BackwardCompatible.cpkg5? How does it differ from
#11 Updated by Anna Maria Bigatti 9 months ago
John Abbott wrote:
There is a commented out fn called
That's a kind of
randomized, with huge coefficients. Good thing it is commented out ;-)
these are the "random" functions in cocoa-5:
--> All 8 matches for "rand": ? random ? randomize ? randomized ? RandomSubset ? RandomSubsetIndices ? RandomTuple ? RandomTupleIndices ? RandomUnimodularMat
I think we could also add
RandomLinearForm(P, Lo, Hi)
#13 Updated by Anna Maria Bigatti 9 months ago
John Abbott wrote:
Why do you want to specify
Is it not enough to specify a single value N and use the symmetric range from -N to N?
because it is more similar to
What about when the coeff ring has non-zero characteristic? Then it might make sense to allow no range?
well, KISS (nothing personal ;-)