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

Function findCell

stackgl_modules/index.js:35889–35906  ·  view source on GitHub ↗
(cells, c)

Source from the content-addressed store, hash-verified

35887
35888//Finds a cell in a normalized cell complex
35889function findCell(cells, c) {
35890 var lo = 0
35891 , hi = cells.length-1
35892 , r = -1
35893 while (lo <= hi) {
35894 var mid = (lo + hi) >> 1
35895 , s = compareCells(cells[mid], c)
35896 if(s <= 0) {
35897 if(s === 0) {
35898 r = mid
35899 }
35900 lo = mid + 1
35901 } else if(s > 0) {
35902 hi = mid - 1
35903 }
35904 }
35905 return r
35906}
35907__webpack_unused_export__ = findCell;
35908
35909//Builds an index for an n-cell. This is more general than dual, but less efficient

Callers 2

incidenceFunction · 0.85

Calls 1

compareCellsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…