MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / vectorAdd

Function vectorAdd

examples/compile-vector-operations.js:16–18  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

14
15// Define vector operation functions
16function vectorAdd(a, b) {
17 return a.map((v, i) => v + b[i]);
18}
19
20function vectorMultiply(a, b) {
21 return a.map((v, i) => v * b[i]);

Callers

nothing calls this directly

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected