From faac8ae9cec879ef329a4823be4029542b2fe061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1m=20Brudzewsky?= Date: Tue, 20 Aug 2024 11:28:56 +0100 Subject: [PATCH] all powersets --- table.tsv | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/table.tsv b/table.tsv index 741230b..512ee8a 100644 --- a/table.tsv +++ b/table.tsv @@ -1503,8 +1503,8 @@ Mv+.×⍥((⊢÷2*∘÷⍨+.×⍨)⊢-+⌿÷≢)Nv Sample Pearson correlation co {1∊⍵:-⎕TRAP←0 'C' '2 ⎕NQ ⎕SE''KeyPress'' ''TC''' ⋄ shy←0}B Stop on the current line if any condition is met Tacit Monadic Function System ⎕stop halt breakpoint break-point debug here statement stopif haltif (⊃÷¯2÷2∘⊃-¯1 1×2*∘÷⍨(×⍨2∘⊃)-(×/4@2))Nv Solutions of quadratic equation Nv₁x²+Nv₂x+Nv₃=0 Tacit Monadic Function Mathematical coefficients f(x)=ax²+bx+c=0 f(x)=ax^2+bx+c=0 As{((¯1*⊃)×2⊥⊃≠,)⊖⍣⍺⊢(8÷⍨≢⍵)8⍴⍵}Bv Convert bits Bv representing a signed integer of As-endianess (0:big, 1:little) into a number Tacit Dyadic Function Data Conversion ⎕DR 163 16-bit 323 32-bit 643 64-bit 1283 128-bit 2563 256-bit 5123 512-bit 10243 1024-bit 645 1287 sint big-endian little-endian be le to-float https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExQMFao1NA6tN9R61NWseXi60aOupUDWo84FOpqPuqY96l38qHfXo65FGhaHtz/qXfGoc9Gj3q2aFo96twDpWgUzk0dtEw0VDLmoYlodzLj//wE -('⎕THIS'{'t'⎕NS⍺⊣t←⍵}∘⍎⍨⊢⊣⎕SHADOW⍤{⍵.⎕NL-⍳9})Ys Unpack members of namespace Ys to the current namespace, localising those names in the process Tacit Monadic Function System destructure open import merge into here '\\(u...)?.'⎕R{0⎕JSON'"',⍵.Match,'"'}Dv Evaluate JSON-style escape sequences (like \n and \u000a) Tacit Monadic Function Text strings escapes characters charvector charvecs backspace bs \b horizontaltab ht \t linefeed lf \n formfeed ff \f carriagereturn cr \r crlf cr+lf \r\n string +('⎕THIS'{'t'⎕NS⍺⊣t←⍵}∘⍎⍨⊢⊣⎕SHADOW⍤{⍵.⎕NL-⍳9})Ys Unpack members of namespace Ys to the current namespace, localising those names in the process Tacit Monadic Function System destructure open import merge into here ((∪∊⊆⍨(2⌷⍉201⌶⍬)['MINI_NAME' 'MINI_QUADVAR'⍳⍨3⌷⍉201⌶⍬]∊⍨∘∊200⌶)⎕NR)Dv Global names used by tradfn/tradop Dv Tacit Monadic Function System globals unlocalised unlocalized un-localised un-localized not list find all identifiers symbols xref cross-reference https://tio.run/##SyzI0U2pTMzJT////1FHu1t@vnVOfnJijvWjvqm@PgpcCkDa0/9R2wQDhUfdLQpgUSDPkEsBrAzIfNQ28VHv5vSc/KTEHC6gEVxANUBhBQ2NRx2rHnV0Pepqe9S7QsPoUc/2R72dRgaGj3q2Pepdoxmt7uvp5xnv5@jrqq4AYQeGOrqEOQapA80DajFG0xELMqx3xaOOGUCGkYEBUFQTaJdfkKaCOtDd6v//AwA Is({⍵/⍨∧⌿2<⌿⍵}1+{(-⍺)↑⍳⍵}⊤∘⍳!×∘!⊣)Js Numeric matrix of all unordered combinations of Is out of Js without replacement Tacit Dyadic Function Mathematical combinatorics selections list vector table remove removing erasing erase eliminate eliminating delete deleting (,⊢⍤/⍨(⊢=⍴⍴⌈⌿)<\⍤,⍤∧⊢=∘⍉⌽∘⍴⍴⌊/)Nm Value of saddle point Tacit Monadic Function Mathematical @@ -1512,8 +1512,8 @@ Is({⍵/⍨∧⌿2<⌿⍵}1+{(-⍺)↑⍳⍵}⊤∘⍳!×∘!⊣)Js Numeric matr Is(⊣|∘⊃{0=⍵:1 0 ⋄ (⍵∇⍵|⍺)+.×0 1,⍪1,-⌊⍺÷⍵}⍨)Js Multiplicative inverse of Js modulo Is (fast) Tacit Dyadic Function Mathematical extended euclidean algorithm modular modulus modinv() invmod() numbertheory arithmetic (1⌽'$^','\*' '\?' '\W'⎕R'.*' '.' '\\&')Dv Convert globbing pattern to regex Tacit Monadic Function Text patterns wildcards characters filenames shell matching string regular expression regexp https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExQ0DB/17FVXiVPXUY/RUldQj7EHEeHqQOkgdT2QiB5IIEZNXVNBPTEp2d7evqKySi9FS/3/fwA '&[^;]+;'⎕R{3⊃,⎕XML⍠'Whitespace' 'Preserve'⊢'<_>',⍵.Match,''}Dv Evaluate XML-style escape sequences (like and ) Tacit Monadic Function Text strings escapes characters charvector charvecs quote " apostrophe ' less-than lessthan < greater-than greaterthan > ampersand & string -('(?!\d)[\wÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]+'⎕S'&')Dv Find all APL identifiers in Dv Tacit Monadic Function Text symbols names dyalog search for locate identify extract isolate valid legal allowed variable function operator label https://help.dyalog.com/latest/#Language/Introduction/Variables/Names.htm '\\(u...|x..)?.'⎕R{0 ⎕JSON⍠'Dialect' 'JSON5'⊢'"',⍵.Match,'"'}Dv Evaluate JS-style escape sequences (like \v and \x0a but not octal) Tacit Monadic Function Text javascript ecmascript es5 strings escapes characters charvector charvecs backspace bs \b horizontaltab ht \t linefeed lf \n formfeed ff \f carriagereturn cr \r crlf cr+lf \r\n string nullbyte zero \0 \x verticaltab +('(?!\d)[\wÀ-ÖØ-Ýßà-öø-üþ∆⍙Ⓐ-Ⓩ]+'⎕S'&')Dv Find all APL identifiers in Dv Tacit Monadic Function Text symbols names dyalog search for locate identify extract isolate valid legal allowed variable function operator label https://help.dyalog.com/latest/#Language/Introduction/Variables/Names.htm (⊃∘⊃({-⍺+.×⍨(+\-+/)@(∘.=⍨⍳∘≢)⍵×∘.≤⍨⍳≢⍵}/≢⍴⊂))Nm Determinant of any square matrix Tacit Function Mathematical Bird'sMethod Bird'sAlgortihm det() |A| det(A) det(Nm) |Nm| dfns.esh digits Shell for Eide-number sums Dfn Function Mathematical Eidenumbers rationalnumber balancedternary hexadecimal REPL https://dfns.dyalog.com/n_esh.htm TimeStamp←TieNo dfns.compidn CompNo Component timestamp in IDN format Dfn Function System https://dfns.dyalog.com/n_compidn.htm @@ -1939,6 +1939,7 @@ X{(⊃0⍴⊂)@(∊∘⍺)⊢⍵}Y Replacing elements of Y in set X with prototy X{⍺⌿⍨~(⍳≢⍺)∊⍺⍳⍵}Y Without (~) on major cells for any rank Dfn Dyadic Function Sets butnot except setdifference setsubtraction setminus higher high-rank any-rank highrank anyrank items elements remove removing erasing erase eliminate eliminating delete deleting X{⍺⍪⍵⌿⍨(≢⍺)<⍺⍳⍵}Y Union (∪) on major cells of any rank Dfn Dyadic Function Sets setor higher high-rank any-rank highrank anyrank items elements {⍵⊂⍤⊢⌸⍥,⍨+/↑⍳⍴⍵}Ym Extract the anti-diagonals of a matrix (without wrap-around) as vector of vectors Dfn Monadic Function Structural table SW-NE extract collect select +{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⍳¯1+2*≢⍵}Y Powerset: All subsets of Y, including the empty set (0⌿Y) but excluding Y itself Dfn Monadic Function Sets power-set all combinations https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExSqH/Xsf9Qx41Hv1kMrHrVNftSz91Fvp9GjrqWPehcfWm/4qHczkNQ20nrUuQioplZB3dHJ2UWdi0zdxgpGj3q3qDsmOiU5J6v//w8A Ms{r×+\⍵÷r←×\1@1⍴∘⍺≢⍵}Nv Accumulate deposits Nv at rate Ms Dfn Dyadic Function Mathematical accumulationof A{⍵∧s=⌈⍀⍺×s←+⍀2<⌿0⍪⍵}B Trim groups of ones in B to begin only where first pointed to by a 1 in A Dfn Dyadic Function Boolean/Logical runs sequences chop limit indicated trues truths 1st contiguous {--⌿(2,≢⍵)⍴⍋⍋⍪⍨⍵}Y Count of occurrences of the cells of Y Dfn Monadic Function Sets tally selfcount items elements @@ -1957,6 +1958,7 @@ X{⍎⍵,'⍺'⍴⍨' '∧.=⍵}Dv Execution of expression Dv with default value {0⎕NCREATE⍠'Unique'1⍨(739⌶0),'/',⍵}Dv Create and tie temporary file with pattern Dv (returns tie number) Dfn Monadic Function System generate avoid clash os operating system Path.GetTempFileName https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExRK8hRAVLUBkO/nHOTqGOL6qHeBemheZmFpqrrho94VGubGlo96thlo6qjrq@s86t1aq6Aer1eSW6DOBTXjUVczSLenn5s/0Lz//wE {⍵⌷⍨⊂⍋{(⎕C⍵)⍵}¨⍵}Y Sorting Y in case-insensitive alphabetical order Dfn Monadic Function Text up increasing caseinsensitive reordering ordering string {(⎕SE.SALT.New'HttpCommand'('GET'⍵)).Run.Data}Dv Download file from URL Dv Dfn Monadic Function System curl online internet http:// https:// wget fetch +{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢⍳¯2+2*≢⍵}Y Powerset: All subsets of Y, excluding the empty set (0⌿Y) and Y itself Dfn Monadic Function Sets power-set all combinations https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExSqH/Xsf9Qx41Hv1kMrHrVNftSz91Fvp9GjrqWPehcfWm/4qGvRo97Nh9YbaRtpPeoEsrfWKqg7Ojm7qHORb4CxgtGj3i3qjolOSc7J6v//AwA {⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳2*≢⍵}Y Powerset: All subsets of Y, including the empty set (0⌿Y) and Y itself Dfn Monadic Function Sets power-set all combinations https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExSqH/Xsf9Qx41Hv1kMrHrVNftSz91Fvp9GjrqWPehcfWm/4qGsRkNR@1LvZSOtR5yKgsloFdUcnZxd1LvINMFYwetS7Rd0x0SnJOVn9/38A Av{~≠\z\2≠/0,~⍵/⍨z←⍺≥⍵}Bv Cumulative all-true (∧\) in each subvectors of Bv indicated by Av (fast ∊∧\¨Av⊂Bv) Dfn Dyafic Function Boolean/Logical quick speedy performance optimised optimized partitioned partitions segmented segments sub-vectors subvectors subarrays sub-arrays sub-lists sublists scan separated separator delimiter {(⊂⍋∊⍳∘≢¨⍵)⌷⊃⍪/⍵}Yv Mesh major cells of elements of Yv Dfn Monadic Function Structural faro weave dovetail the technique zipper rippleshiffle riffleshuffle zipping merge merging interweave interweaving interleave interleaving shuffle shuffling meshing cyclically list high-rank higher-rank arrays https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExSqNR51NT3q7X7U0fWod/OjjhmPOhcdWvGod6vmo57tj7qaH/Wu0gfyahXUE5OS1YGaXNQdnZxdXN3UuUg1QcNEwehR7xb1xMSkpOTklBR1TQ0jiIijo5OTuub//wA @@ -1978,6 +1980,7 @@ Av{(⍺⌿⍵)∧a⌿1⊖a←⍺⌿⍨⍵≤⍺}Bv All elements true (∧⌿) on Av{(⍺⌿⍵)≥a⌿1⊖a←⍺⌿⍨⍵∨⍺}Bv Any element true (∨⌿) on each subvector of Bv partitioned by Av (fast ∨⌿¨Av⊂[1]Bv) Dfn Dyadic Function Boolean/Logical speed quick sub-vector cell item ∨/¨Av⊂[1]Bv Ms{(+⌿(⍵*⍺)÷≢⍵)*÷⍺}N Generalised mean Dfn Dyadic Function Mathematical x-mean xmean generalized power Hölder holder cubic {⍵/⍨(⊢∨≠\)⍵=''''}Dv Extract text (including quotes) in expression Dfn Monadic Function Text strings string +{⌿∘⍵¨↓⌽⍉2⊥⍣¯1⊢¯1+⍳¯1+2*≢⍵}Y Powerset: All subsets of Y, excluding the empty set (0⌿Y) but including Y itself Dfn Monadic Function Sets power-set all combinations https://tio.run/##SyzI0U2pTMzJT////1Hf1EdtExSqH/Xsf9Qx41Hv1kMrHrVNftSz91Fvp9GjrqWPehcfWm/4qGsRkNR@1LsZRBlpPepcBFRaq6Du6OTsos5FmSHGCkaPereoOyY6JTknq///DwA {⍵⌽⍨-⌊2÷⍨+/∧\' '=⌽⍵}Dm Centering flush left character array Dfn Monadic Function Text centre align string Av{+⍀⍵-⍺⍀¯2-⌿0⍪⍺⌿+⍀¯1↓0⍪⍵}N Cumulative sum (+⍀) in each subvector of N indicated by Av (fast ∊+\¨Av⊂Nv) Dfn Dyadic Function Mathematical quick speedy performance optimised optimized partitioned partitions segmented segments sub-vectors subvectors subarrays sub-arrays sub-lists sublists major cells rows sums scan separated separator delimiter Av{≠⍀⍵≠⍺⍀2≠⌿0⍪⍺⌿≠⍀¯1↓0⍪⍵}B Running parity (≠⍀) in each subvector of B indicated by Av (fast ∊≠\¨Av⊂Bv) Dfn Dyadic Function Boolean/Logical quick speedy performance optimised optimized partitioned partitions segmented segments sub-vectors subvectors subarrays sub-arrays sub-lists sublists major cells rows parities scan separated separator delimiter