Union: computing the union of many sets in on step if this is more efficient #6251
Replies: 3 comments 10 replies
-
|
Can you please give an example? |
Beta Was this translation helpful? Give feedback.
-
|
Operations cannot be variadic in GAP. So I guess that's why we have |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I was thinking the same as Max, while in practice most people probably union a bunch of the same things (ranges, lists, whatever), there isn't really a way of union hooking into that. I had a similar problem with efficiently intersecting a list of permutation groups. I don't have a good solution unfortunately. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What to do when forming a union of many sets in one step would be quick, but the function
Uniondoes it step-by-step, calling the operationUnion2repeatedly? -- This is interesting for example in situations when the union of many residue class unions should be computed (every call toUnion2needs to bring the result to normal form etc., such that computing the union of several thousand residue class unions can sometimes take a thousand times longer than it would take to compute the union in one step). Of course, the ugly solution would be to write a dedicated function with a name different fromUnion-- but I am looking for a more elegant solution.Beta Was this translation helpful? Give feedback.
All reactions