MCPcopy Create free account
hub / github.com/plotly/plotly.js / generateGradient

Function generateGradient

stackgl_modules/index.js:30022–30042  ·  view source on GitHub ↗
(boundaryConditions)

Source from the content-addressed store, hash-verified

30020
30021
30022function generateGradient(boundaryConditions) {
30023 var token = boundaryConditions.join()
30024 var proc = GRADIENT_CACHE[token]
30025 if(proc) {
30026 return proc
30027 }
30028
30029 var d = boundaryConditions.length
30030
30031 var linkArgs = [ centralDiff, zeroOut ]
30032 for(var i=1; i<=d; ++i) {
30033 linkArgs.push(generateTemplate(i))
30034 }
30035
30036 var link = CACHED_link
30037
30038 var proc = link.apply(void 0, linkArgs)
30039
30040 GRADIENT_CACHE[token] = proc
30041 return proc
30042}
30043
30044module.exports = function gradient(out, inp, bc) {
30045 if(!Array.isArray(bc)) {

Callers 1

index.jsFile · 0.85

Calls 1

generateTemplateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…