MCPcopy Index your code
hub / github.com/plotly/plotly.js / skeleton

Function skeleton

stackgl_modules/index.js:35983–36003  ·  view source on GitHub ↗
(cells, n)

Source from the content-addressed store, hash-verified

35981
35982//Enumerates all of the n-cells of a cell complex
35983function skeleton(cells, n) {
35984 if(n < 0) {
35985 return []
35986 }
35987 var result = []
35988 , k0 = (1<<(n+1))-1
35989 for(var i=0; i<cells.length; ++i) {
35990 var c = cells[i]
35991 for(var k=k0; k<(1<<c.length); k=bits.nextCombination(k)) {
35992 var b = new Array(n+1)
35993 , l = 0
35994 for(var j=0; j<c.length; ++j) {
35995 if(k & (1<<j)) {
35996 b[l++] = c[j]
35997 }
35998 }
35999 result.push(b)
36000 }
36001 }
36002 return normalize(result)
36003}
36004__webpack_unused_export__ = skeleton;
36005
36006//Computes the boundary of all cells, does not remove duplicates

Callers 2

dualFunction · 0.85

Calls 1

normalizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…