Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cortex-js/compute-engine
/ vectorSubtract
Function
vectorSubtract
examples/compile-vector-operations.js:24–26 ·
view source on GitHub ↗
(a, b)
Source
from the content-addressed store, hash-verified
22
}
23
24
function
vectorSubtract(a, b) {
25
return
a.map((v, i) => v - b[i]);
26
}
27
28
// Example 1: Simple vector addition
29
console.log(
'Example 1: Vector Addition'
);
Callers
nothing calls this directly
Calls
1
map
Method · 0.65
Tested by
no test coverage detected