mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-05 20:11:13 +08:00
Initial commit: NOFX AI Trading System
- Multi-AI competition mode (Qwen vs DeepSeek) - Binance Futures integration - AI self-learning mechanism - Professional web dashboard - Complete risk management system
This commit is contained in:
19
web/node_modules/d3-array/src/leastIndex.js
generated
vendored
Normal file
19
web/node_modules/d3-array/src/leastIndex.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import ascending from "./ascending.js";
|
||||
import minIndex from "./minIndex.js";
|
||||
|
||||
export default function leastIndex(values, compare = ascending) {
|
||||
if (compare.length === 1) return minIndex(values, compare);
|
||||
let minValue;
|
||||
let min = -1;
|
||||
let index = -1;
|
||||
for (const value of values) {
|
||||
++index;
|
||||
if (min < 0
|
||||
? compare(value, value) === 0
|
||||
: compare(value, minValue) < 0) {
|
||||
minValue = value;
|
||||
min = index;
|
||||
}
|
||||
}
|
||||
return min;
|
||||
}
|
||||
Reference in New Issue
Block a user