static int indexOfMinEntryInDoubleArray(double[] a) { if (empty(a)) ret -1; int bestIndex = 0; double bestValue = a[0]; int n = l(a); for (int i = 1; i < n; i++) { double x = a[i]; if (x < bestValue) { bestIndex = i; bestValue = x; } } ret bestIndex; }
Began life as a copy of #1030551
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030560 |
Snippet name: | indexOfMinEntryInDoubleArray |
Eternal ID of this version: | #1030560/1 |
Text MD5: | e48fbd2bfdc6f43e52412579c123ca2a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-01-07 18:45:20 |
Source code size: | 303 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 168 / 203 |
Referenced in: | [show references] |