MCPcopy Index your code
hub / github.com/OpenSourcePhysics/osp / max

Method max

src/org/opensourcephysics/numerics/ArrayLib.java:32–42  ·  view source on GitHub ↗

Find the maximum value in an array. @param a the array @param indMax the array minimum index @return the maximum value in the array

(double[] a)

Source from the content-addressed store, hash-verified

30 * @return the maximum value in the array
31 */
32 public static final double max(double[] a) {
33 double max = Double.NEGATIVE_INFINITY;
34 for ( int i=0; i<a.length; ++i ) {
35 if ( a[i] > max )
36 {
37 max = a[i];
38 IndexMax = i;
39 }
40 }
41 return max;
42 }
43
44 /**
45 * Find the minimum value in an array.

Callers 15

mediainfo.jsFile · 0.80
createGUIMethod · 0.80
refreshGUIMethod · 0.80
setFontLevelMethod · 0.80
getStyleDialogMethod · 0.80
setTopComponentMethod · 0.80
createGUIMethod · 0.80
setFontLevelMethod · 0.80
rebuildAndDisplayTabsMethod · 0.80
stateChangedMethod · 0.80

Calls

no outgoing calls

Tested by 2

findNearestXIndexMethod · 0.64
findNearestXIndex0Method · 0.64