MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / max

Method max

JSAT/src/jsat/linear/Vec.java:457–473  ·  view source on GitHub ↗

Returns the maximum value stored in this vector @return the maximum value in this vector

()

Source from the content-addressed store, hash-verified

455 * @return the maximum value in this vector
456 */
457 public double max()
458 {
459 if (isSparse() && nnz() < length())
460 {
461 double max = 0.0;
462 for (IndexValue iv : this)
463 max = Math.max(max, iv.getValue());
464 return max;
465 }
466 else
467 {
468 double max = get(0);
469 for (int i = 1; i < length(); i++)
470 max = Math.max(max, get(i));
471 return max;
472 }
473 }
474
475 /**
476 * Computes the sum of the values in this vector

Callers 15

trainCMethod · 0.95
trainCMethod · 0.95
trainMethod · 0.95
iterationStepMethod · 0.95
enlageIfNeededMethod · 0.45
enlargeIfNeededMethod · 0.45
enlargeIfNeededMethod · 0.45
IntSetMethod · 0.45
IntDoubleMapMethod · 0.45
LongDoubleMapMethod · 0.45
addMethod · 0.45
subSetMethod · 0.45

Calls 5

isSparseMethod · 0.95
nnzMethod · 0.95
lengthMethod · 0.95
getMethod · 0.95
getValueMethod · 0.45

Tested by 2

dCalcMethod · 0.36
dCaldOMethod · 0.36