Add other set operations

This commit is contained in:
d98762625 2018-04-09 11:13:23 +01:00
parent 852c95a994
commit adc4f78e99
12 changed files with 513 additions and 2 deletions

View file

@ -120,7 +120,11 @@ const Categories = [
name: "Arithmetic / Logic",
ops: [
"Set Union",
"Set Intersection"
"Set Intersection",
"Set Difference",
"Symmetric Difference",
"Cartesian Product",
"Power Set",
// "XOR",
// "XOR Brute Force",
// "OR",

View file

@ -1,4 +1,23 @@
{
"Cartesian Product": {
"module": "Default",
"description": "Get the cartesian product of two sets",
"inputType": "string",
"outputType": "string",
"flowControl": false,
"args": [
{
"name": "Sample delimiter",
"type": "binaryString",
"value": "\\n\\n"
},
{
"name": "Item delimiter",
"type": "binaryString",
"value": ","
}
]
},
"From Base32": {
"module": "Default",
"description": "Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",
@ -155,6 +174,20 @@
}
]
},
"Power Set": {
"module": "Default",
"description": "Generate the power set of a set",
"inputType": "string",
"outputType": "string",
"flowControl": false,
"args": [
{
"name": "Item delimiter",
"type": "binaryString",
"value": ","
}
]
},
"Raw Deflate": {
"module": "Default",
"description": "Compresses data using the deflate algorithm with no headers.",
@ -305,6 +338,25 @@
}
]
},
"Symmetric Difference": {
"module": "Default",
"description": "Get the symmetric difference of two sets",
"inputType": "string",
"outputType": "string",
"flowControl": false,
"args": [
{
"name": "Sample delimiter",
"type": "binaryString",
"value": "\\n\\n"
},
{
"name": "Item delimiter",
"type": "binaryString",
"value": ","
}
]
},
"To Base32": {
"module": "Default",
"description": "Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",

View file

@ -5,15 +5,18 @@
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import CartesianProduct from "../../operations/CartesianProduct";
import FromBase32 from "../../operations/FromBase32";
import FromBase64 from "../../operations/FromBase64";
import FromHex from "../../operations/FromHex";
import PowerSet from "../../operations/PowerSet";
import RawDeflate from "../../operations/RawDeflate";
import SetDifference from "../../operations/SetDifference";
import SetIntersection from "../../operations/SetIntersection";
import SetOps from "../../operations/SetOps";
import SetUnion from "../../operations/SetUnion";
import ShowBase64Offsets from "../../operations/ShowBase64Offsets";
import SymmetricDifference from "../../operations/SymmetricDifference";
import ToBase32 from "../../operations/ToBase32";
import ToBase64 from "../../operations/ToBase64";
import ToHex from "../../operations/ToHex";
@ -21,15 +24,18 @@ import ToHex from "../../operations/ToHex";
const OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
OpModules.Default = {
"Cartesian Product": CartesianProduct,
"From Base32": FromBase32,
"From Base64": FromBase64,
"From Hex": FromHex,
"Power Set": PowerSet,
"Raw Deflate": RawDeflate,
"Set Difference": SetDifference,
"Set Intersection": SetIntersection,
"": SetOps,
"Set Union": SetUnion,
"Show Base64 offsets": ShowBase64Offsets,
"Symmetric Difference": SymmetricDifference,
"To Base32": ToBase32,
"To Base64": ToBase64,
"To Hex": ToHex,