theprogrammablemind_4wp
Advanced tools
Comparing version
@@ -18,2 +18,3 @@ const { Semantics, Semantic } = require('./src/semantics') | ||
where: client.where, | ||
stableId: client.stableId, | ||
w: client.w, | ||
@@ -20,0 +21,0 @@ Config, |
@@ -68,4 +68,4 @@ { | ||
}, | ||
"version": "7.12.7", | ||
"version": "7.12.8-beta.0", | ||
"license": "UNLICENSED" | ||
} |
@@ -84,15 +84,27 @@ const toA = (edge) => { | ||
minima (nodes) { | ||
let minima = new Set(nodes) | ||
const ancestors = new Set([]) | ||
nodes.forEach((node) => { | ||
this.ancestors(node).forEach((n) => ancestors.add(n)) | ||
}) | ||
ancestors.forEach((n) => minima.delete(n)) | ||
if (minima.size === 0) { | ||
// all unrelated | ||
minima = new Set(nodes) | ||
nodes = new Set(nodes) | ||
const nodeToDescendants = {} | ||
for (const node of nodes) { | ||
nodeToDescendants[node] = this.descendants(node) | ||
} | ||
let minima = new Set() | ||
for (const node of nodes) { | ||
let okay = true | ||
for (const key of nodeToDescendants[node]) { | ||
if (nodes.has(key)) { | ||
if (key in nodeToDescendants && nodeToDescendants[key].has(node)) { | ||
continue | ||
} | ||
okay = false | ||
break | ||
} | ||
} | ||
if (okay) { | ||
minima.add(node) | ||
} | ||
} | ||
return minima | ||
} | ||
/* | ||
maxima (nodes) { | ||
@@ -107,2 +119,3 @@ const maxima = new Set(nodes) | ||
} | ||
*/ | ||
@@ -113,5 +126,11 @@ add (child, parent) { | ||
exists(child, parent) { | ||
return this._edges.findIndex((edge) => edge[0] == child && edge[1] == parent) != -1 | ||
} | ||
addList (l) { | ||
for (let i = 1; i < l.length; ++i) { | ||
this._edges.push([l[i - 1], l[i]]) | ||
if (!this.exists(l[i-1], l[i])) { | ||
this._edges.push([l[i - 1], l[i]]) | ||
} | ||
} | ||
@@ -118,0 +137,0 @@ } |
@@ -116,15 +116,27 @@ const toA = (edge) => { | ||
minima (nodes) { | ||
let minima = new Set(nodes) | ||
const ancestors = new Set([]) | ||
nodes.forEach((node) => { | ||
this.ancestors(node).forEach((n) => ancestors.add(n)) | ||
}) | ||
ancestors.forEach((n) => minima.delete(n)) | ||
if (minima.size === 0) { | ||
// all unrelated | ||
minima = new Set(nodes) | ||
nodes = new Set(nodes) | ||
const nodeToDescendants = {} | ||
for (const node of nodes) { | ||
nodeToDescendants[node] = this.descendants(node) | ||
} | ||
let minima = new Set() | ||
for (const node of nodes) { | ||
let okay = true | ||
for (const key of nodeToDescendants[node]) { | ||
if (nodes.has(key)) { | ||
if (key in nodeToDescendants && nodeToDescendants[key].has(node)) { | ||
continue | ||
} | ||
okay = false | ||
break | ||
} | ||
} | ||
if (okay) { | ||
minima.add(node) | ||
} | ||
} | ||
return minima | ||
} | ||
/* | ||
maxima (nodes) { | ||
@@ -139,2 +151,3 @@ const maxima = new Set(nodes) | ||
} | ||
*/ | ||
@@ -145,5 +158,11 @@ add (child, parent) { | ||
exists(child, parent) { | ||
return this._edges.find((edge) => edge[0] == child && edge[1] == parent) | ||
} | ||
addList (l) { | ||
for (let i = 1; i < l.length; ++i) { | ||
this._edges.push([l[i - 1], l[i]]) | ||
if (!this.exists(l[i-1], l[i])) { | ||
this._edges.push([l[i - 1], l[i]]) | ||
} | ||
} | ||
@@ -150,0 +169,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Explicitly Unlicensed Item
License(Experimental) Something was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Explicitly Unlicensed Item
License(Experimental) Something was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
230985
-0.63%6649
-0.7%2
100%