MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / order

Method order

ij/src/main/java/ij/measure/Minimizer.java:819–832  ·  view source on GitHub ↗

Find the simplex vertices with the worst, nextWorst and best values of the target function

(double[][] simp, int[] worstNextBestArray)

Source from the content-addressed store, hash-verified

817 /** Find the simplex vertices with the worst, nextWorst and best values
818 * of the target function */
819 private void order(double[][] simp, int[] worstNextBestArray) {
820 int worst = 0, nextWorst = 0, best = 0;
821 for (int i = 0; i < numVertices; i++) {
822 if (value(simp[i]) < value(simp[best])) best = i;
823 if (value(simp[i]) > value(simp[worst])) worst = i;
824 }
825 nextWorst = best;
826 for (int i = 0; i < numVertices; i++)
827 if (i != worst && value(simp[i]) > value(simp[nextWorst]))
828 nextWorst = i;
829 worstNextBestArray[WORST] = worst;
830 worstNextBestArray[NEXT_WORST] = nextWorst;
831 worstNextBestArray[BEST] = best;
832 }
833
834 // Display simplex [Iteration: s0(p1, p2....), s1(),....] in Log window
835 private synchronized void showSimplex(double[][] simp, String heading) {

Callers 10

minimizeMethod · 0.95
testByteOrderMethod · 0.80
testByteOrderMethod · 0.80
checksumMethod · 0.80
decodeMethod · 0.80
GZipCompressorClass · 0.80
setByteOrderMethod · 0.80
byteOrderMethod · 0.80
setByteOrderMethod · 0.80
byteOrderMethod · 0.80

Calls 1

valueMethod · 0.95

Tested by 2

testByteOrderMethod · 0.64
testByteOrderMethod · 0.64