tag:blogger.com,1999:blog-11149365.post8206731924690346821..comments2024-03-23T04:34:59.089+00:00Comments on Go deh!: Set divisions/partitionsPaddy3118http://www.blogger.com/profile/06899509753521482267noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-11149365.post-83114798775090575302014-12-07T21:05:33.841+00:002014-12-07T21:05:33.841+00:00Thanks, this helps. One more question: say that I ...Thanks, this helps. One more question: say that I am interested in only finding unique elements to a set rather than computing all possible binary combinations. For example, given A, B and C sets this code returns A, B, AB, C, AC, BC, ABC. I am interested in calculating only A, B and C conditions. How can I modify the code to obtain this result? Gökhan Severhttps://www.blogger.com/profile/17112569021092421804noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-55429852825918989532014-12-07T00:49:08.242+00:002014-12-07T00:49:08.242+00:00if you have a list pf sets just unpack it in the c...if you have a list pf sets just unpack it in the call, something like:<br /><br />venndiv(*list_of_sets)<br />Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-3640426033075468192014-12-07T00:47:30.486+00:002014-12-07T00:47:30.486+00:00Sorry for the late reply.
def bin_order(n):
.......Sorry for the late reply.<br /><br />def bin_order(n):<br /><br />....return ['bin' + ''.join(chr(65+j) for j in range(n) if i & 1<<j)<br /><br />............for i in range(1,2**n)]<br /><br /><br />Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-48967934438150273622014-12-06T16:16:06.678+00:002014-12-06T16:16:06.678+00:00Hello,
I am wondering if there is a way to pass n...Hello,<br /><br />I am wondering if there is a way to pass n-number of sets into this function, instead of specifying one by one?<br /><br />Thanks.Gökhan Severhttps://www.blogger.com/profile/17112569021092421804noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-50750295948570535012013-07-19T10:51:32.233+01:002013-07-19T10:51:32.233+01:00Hi paddy3118,
Thast exactly what I need :)
But, t...Hi paddy3118,<br />Thast exactly what I need :)<br /><br />But, there has been a problem in the visualization of the bin_order function, could you paste it in plain text.<br />Thanks in advance<br /><br />PeioAnonymoushttps://www.blogger.com/profile/15639633983725374832noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-61780595481897323852013-07-10T10:49:06.613+01:002013-07-10T10:49:06.613+01:00Sure! Thanks for the suggestion. http://bosker.wor...Sure! Thanks for the suggestion. http://bosker.wordpress.com/2013/07/10/venn-diagram-partitioning/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11149365.post-6397491840602238672013-07-09T06:50:58.838+01:002013-07-09T06:50:58.838+01:00Bosker, Any chance of maybe you doing your own blo...Bosker, Any chance of maybe you doing your own blog entry on how you developed your answer as well as expanding on how it works?Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-43936648303294922082013-07-09T06:33:59.846+01:002013-07-09T06:33:59.846+01:00Hi bosker, saw your code and will take a look in t...Hi bosker, saw your code and will take a look in the next 12 hour hopefully.<br /><br />As for the lack of decent editing facilities; It seems Google gets enough ad revenue with this level of support. I and others have asked years ago but not much changes. I wouldn't be surprised if they can blogger in the near future as not being "shiney-shiney" enough.Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-66300237848825687762013-07-08T18:24:06.951+01:002013-07-08T18:24:06.951+01:00Is there any way to indent code in these comments?...Is there any way to indent code in these comments? I haven’t found one, so instead I put the code I wanted to post <a href="https://gist.github.com/robinhouston/5950688" rel="nofollow">here on gist</a>.<br /><br />It’s a different way to write your venndiv function, more to my personal taste (but perhaps less to yours).Anonymousnoreply@blogger.com