javascript - Javascript 地图问题。Evaluate() 中的并行参数
问题描述
下面是我目前拥有的代码,它评估一个函数,将 tValues 的范围插入函数中的“t”。我还想为“r”插入 rValues
const rValues = Array.from({length: tValues.length}, () => Math.floor(Math.random() * tValues.length));
const xValues = tValues.map(function (x) {return x1.evaluate({t: x})})```
essentially I need something like "function(x,y) {return x1.evaluate({t:x,r:y})}"
but I know that map doesn't do this that way.
解决方案
推荐阅读
- apache-camel - Unable to load class org.eclipse.jetty.server.Connector error while establishing secured soap server using apache CXF
- java - optaplanner BendableLongScore with two softScores
- java - 使用 DirectByteBuffer 的 Kafka 生产者
- c# - 为什么 Linq Prepend() 不适用于 List
? - angular - 带有嵌套路由的 Angular routerLinkActive
- multithreading - 由于 OutOfMemoryError 导致 DataFrame 广播失败时,Apache Spark 驱动程序挂起
- mysql - 在 HANA DB 上使用 UNION SELECT 和过滤器时如何获得更好的性能
- python - 如何从熊猫数据框列广播文本字符串的子集
- visibility - A-frame:通过单击隐藏另一个系列后显示一系列元素
- android - 从 uri 获取数据列的值时出现 IllegalArgumentException