I found a way to pass options to functions in gap (looking at the use of 
function_factory in permgroup.py); I guess it can be improved and I do not 
know how to make it more useful. I put an example. In LINS package there is 
a function called LowIndexNormalSubs; without options, applied to a group G 
and a number n, it gives all the normal subgroups of G of index at most n; 
if one is only interested in n-index subgroups one has to pass the option 
allSubgroups as false; if only these subgroups are needed it is much faster 
than computing all of them and filter. The following seams to work
low_index_normal_subgroups_exact = libgap.function_factory("""function(G, 
n) return LowIndexNormalSubs(G, n : allSubgroups := false); end; """)

El sábado, 29 de marzo de 2025 a las 10:24:29 UTC+1, enriqu...@gmail.com 
escribió:

> Thank you. I have a couple of installations, one with system gap (with 
> package browser), the other one gap is inside sage. Loading ctbllib is 
> possible in both cases but it only loads browse in the first case. Anyway, 
> it seems better to exclude xgap and browse (which do not seem very useful 
> in sage at first sight). 
> Do you have any ideas about how to solve the issue concerning passing 
> options? Enrique.
>
> El jueves, 27 de marzo de 2025 a las 8:36:42 UTC+1, Antonio Rojas escribió:
>
>> The browse package is also causing trouble, simply having it installed 
>> makes doctesting hang (as it is automatically loaded by the standard 
>> ctbllib package if present).
>>
>> El jueves, 27 de marzo de 2025 a las 1:22:09 UTC+1, François Bissey 
>> escribió:
>>
>>> the xgap package was the guilty party causing trouble if my memory 
>>> serves me right from all those years ago. It was automatically loaded too.
>>> I cannot remember how I figured it out now. xgap would not load by 
>>> itself these days, if it still exists.
>>>
>>> François
>>>
>>>
>>> On 27/03/2025 09:19, enriqu...@gmail.com wrote:
>>>
>>> I have opened https://github.com/sagemath/sage/pull/39783. The 
>>> immediate goal is to add a recent gap package. There are several points 
>>> tangentially related with this PR that I wanted to share to the community: 
>>>
>>>    1. Is there a reason to do not add some other packages? Long time 
>>>    ago, I think someone told me that they may interfere with other sage 
>>>    packages, but it is not clear to me since they must be loaded 
>>> explicitely. 
>>>    2. The compilation of gap_packages takes quite a while. Taking out 
>>> sdh_make 
>>>    -j1 in spkg-install.in allows to compile in parallel each packages, 
>>>    but I wonder if there was a reason to avoid parallelism. In the same 
>>> ideas, 
>>>    since there are several packages to be built, it could be a good idea to 
>>>    allow parallelism at the level of packages, but I do not how to do it.
>>>    3. The third one is related with the use of gap functions. One 
>>>    option is to add more functions to gap_functions.py, but I do not know 
>>> if 
>>>    adding too much functions may affect to the memory. A second option is 
>>> to 
>>>    use libgap.function_factory; it is OK. My issue is how to pass options 
>>> to 
>>>    gap functions. I have not found how to do it. In order to use 
>>> libgap.eval, 
>>>    I do not know for example how to produce a gap string from a sage group. 
>>>
>>> Thanks, Enrique.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-devel" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-devel+...@googlegroups.com.
>>> To view this discussion visit 
>>> https://groups.google.com/d/msgid/sage-devel/4a3dfcff-70bb-4785-ad59-b00c1ffb2152n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/sage-devel/4a3dfcff-70bb-4785-ad59-b00c1ffb2152n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/4993d43d-dd14-4590-97cf-ec8237b68f84n%40googlegroups.com.

Reply via email to