why don't you call the function simpy random as usual in Integers, or,
if there is a reason, please use the old AXIOM naming convention and not
underscore, i.e. randomElement

Am 04.10.15 um 14:21 schrieb Waldek Hebisch:
> Several algorithm depend on randomized choice of element.
> Currently we have ramdom() for finite domains and random(n)
> for integers, but in other cases choice is more or less ad hoc.
>
> I think we should have a new category, like:
>
> )abbrev category RCHOICE RandomChoice
> RandomChoice : Category == with
>        random_element : Integer -> Union(%, "failed")
>           ++ random_element(n) generates random element
>           ++ with values in some set having of order \spad{n}
>           ++ elements and with probability distribution that is
>           ++ roughly uniform on this set.  Returns failed if
>           ++ \spad{%} has less than \spad{n} elements.
>
> The idea is that unlike say simulations we do not need perfectly
> uniform distribution (and given that support of distribution
> is unspecified claim of exact uniformity would have little
> meaning), which may simplify implementation.  Also, we can
> not magically enlarge finite domains, so if users requent
> choice from more elements than available the only possibility
> is to fail.
>
> AFAICS this condition will propagate resonably well trough
> type towers. In particular we can give generic definition for
> all finite domains and easily propagate it from infinite
> domains to bigger infinite domains.
>
> Natural name for operation would be 'random', but it may
> conflict with existing 'random(n)' in some domains.  ATM
> I do not see if such conflict leads to troubles or is just
> harmless, so I opted for different name.
>
> Comments?
>

-- 
Mit freundlichen Grüßen

Johannes Grabmeier

Fraktionsvorsitzender 
FREIE WÄHLER, Stadtrat Deggendorf

Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Fax: +49-(0)-3224-192688

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to