Efficient method of removing duplicacy in Lists in GAP

gapgroup-theory

Suppose that in GAP, a list is made up of certain conjugacy classes of a group $G$. Now, the list can contain same conjugacy class more than once, that is, there can be duplicacy. A standard method to remove duplicacy as far as I know is to write $S:=Set(K);$, where $K$ is our given list.

Is there any other efficient way to do this. A reason to ask this is if the conjugacy classes in the list $K$ are really large in size then the command $Set(K)$ , I suspect is not much efficient!

Thanks in advance for any kind of help!

Best Answer

Using Set will also aim to arrane in an (induced) total ordering, which can be expensive to compute. Unique removes duplicates without trying to sort, and is probably what you want to use

Related Question