Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operation request: Set theory ops #236

Closed
n1474335 opened this issue Jan 18, 2018 · 1 comment
Closed

Operation request: Set theory ops #236

n1474335 opened this issue Jan 18, 2018 · 1 comment

Comments

@n1474335
Copy link
Member

Summary

It would be useful to have a number of operations to perform common set theory tasks on data. Operations could include:

  • Union
  • Intersection
  • Set Difference
  • Symmetric Difference
  • Cartesian Product
  • Power Set

Details here: https://en.wikipedia.org/wiki/Set_theory

Multiple sets could be input with a delimiter between them in a similar fashion to the 'Diff' operation.

There are some operations already in CyberChef which fulfil some of these functions (such as the 'Unique' operation), however it would be useful to have a full set dedicated to multiple input sets. These operations could live in the 'Arithmetic/Logic' category.

Example

Operation: Union
Args:

  • Sample delimiter: \n\n
  • Item delimiter: ,

Input:

One,Two,Three

Two,Three,Four

Output:

One,Two,Three,Four

Operation: Intersection
Args:

  • Sample delimiter: \n\n
  • Item delimiter: ,

Input:

One,Two,Three

Two,Three,Four

Output:

Two,Three

Operation: Set Difference
Args:

  • Sample delimiter: \n\n
  • Item delimiter: ,

Input:

One,Two,Three

Two,Three,Four

Output:

One

Operation: Symmetric Difference
Args:

  • Sample delimiter: \n\n
  • Item delimiter: ,

Input:

One,Two,Three

Two,Three,Four

Output:

One,Four

Operation: Cartesian Product
Args:

  • Sample delimiter: \n\n
  • Item delimiter: ,

Input:

One,Two,Three

A,B,C

Output:

(One,A),(Two,B),(Three,C)

Operation: Power Set
Args:

  • Item delimiter: ,

Input:

One,Two,Three

Output:


One
Two
Three
One,Two
One,Three
Two,Three
One,Two,Three
@ghost
Copy link

ghost commented Dec 30, 2018

Since these operations are now in the master branch can this issue be closed?

@n1474335 n1474335 closed this as completed Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant