From a41be5fd67a12a927a12f1d300223f1e98d4478c Mon Sep 17 00:00:00 2001 From: martindholmes Date: Thu, 5 Sep 2024 15:26:02 -0700 Subject: [PATCH] Remove unused and superceded custom methods from XSet class. --- js/SSResultSet.js | 2 +- js/StaticSearch.js | 2 +- js/XSet.js | 39 +++------------------------------------ 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/js/SSResultSet.js b/js/SSResultSet.js index 201deed6..3775ccaf 100644 --- a/js/SSResultSet.js +++ b/js/SSResultSet.js @@ -222,7 +222,7 @@ class SSResultSet{ } let ctxIds = ctx.in; let ctxSet = new XSet(ctxIds); - let intersection = ctxSet.xIntersection(activeContextIds); + let intersection = ctxSet.intersection(activeContextIds); return (intersection.size > 0); }); // If there are no contexts left, then diff --git a/js/StaticSearch.js b/js/StaticSearch.js index 9fbcf764..7dffbd59 100644 --- a/js/StaticSearch.js +++ b/js/StaticSearch.js @@ -1187,7 +1187,7 @@ class StaticSearch{ if (xSets.length > 0){ let result = xSets[0]; for (var i=1; i xSet2.has(x))); - } -/** @function XSet~xDifference - * @param {XSet} xSet2 another instance of the XSet class. - * @description this computes the set of items which appear - * in this set but not in the parameter set. - * @return {XSet} a new instance of XSet only the items - * which appear in this set but not in xSet2. - */ - xDifference(xSet2){ - return new XSet([...this].filter(x => !xSet2.has(x))); - } + /** @function XSet~addArray * @param {!Array} arr an array of values that are to be added. * @description this is a convenience function for adding a set of