开发者

Is there a name or more info for this type of set/list "transposition" operation?

开发者 https://www.devze.com 2023-04-12 20:16 出处:网络
Is there a name for the following type of set/list \"transposition\" operation?(Probably abusing some formal terms here, but that\'s the whole reason for my question :)

Is there a name for the following type of set/list "transposition" operation? (Probably abusing some formal terms here, but that's the whole reason for my question :)

I have the following list containing sets:

1 = {a,b,c}
2 = {a,b,d,e}
3 = {a,c,e}

I then go through the list to make the following, a list of each开发者_如何学C occurrence of the items that were in the sets. You can see that 'a' was in 1, 2, and 3, so those are listed, and so on.

a = {1,2,3}
b = {1,2}
c = {1,3}
d = {2}
e = {2,3}

Transforming the list in this way is useful if I want to for example, compare the lettered sets to each other.


What you are doing is reminiscent of an inverted index in database-speak. So, perhaps "invert" would be an appropriate name for it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号