Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input sets

by kikuchiyo (Hermit)
on Dec 16, 2018 at 15:47 UTC ( [id://1227318]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input sets
in thread RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input sets

But there's no facility to select elements that are unique to each set, i.e. select elements from each set which aren't present in the other sets

There is. '100' selects elements that are unique to the first set. '001|010|100' selects what you want.

then a lispish sort of query specification might do the job, as used in LDAP queries - (|(&(1=0)(!(2=-1)))(3=1)(4=1)) - perhaps translated into "and", "or", "in", "not in" and such to make it more perlish. Or "and", "or", "not", "nor", "xor" etc - basically, you need boolean logic and precedence to process things, and a descriptive input specification which supports that.

This is precisely what I didn't want to do. Lot of work, lot of edge cases, lot of tests and documentation to write.

  • Comment on Re^2: RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input sets

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1227318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found