MCPcopy Create free account
hub / github.com/apache/pig / getProbVecSum

Method getProbVecSum

test/org/apache/pig/test/TestFindQuantiles.java:130–142  ·  view source on GitHub ↗
(int numSamples, int numReduceres)

Source from the content-addressed store, hash-verified

128 }
129
130 private float getProbVecSum(int numSamples, int numReduceres) throws Exception {
131 DataBag samples = generateUniqueSamples(numSamples);
132 Map<String, Object> res = getFindQuantilesResult(samples, numReduceres);
133
134 InternalMap weightedPartsData = (InternalMap) res.get(FindQuantiles.WEIGHTED_PARTS);
135 Iterator<Object> it = weightedPartsData.values().iterator();
136 float[] probVec = getProbVec((Tuple)it.next());
137 float sum = 0.0f;
138 for (float f : probVec) {
139 sum += f;
140 }
141 return sum;
142 }
143
144}

Callers 2

testFindQuantilesMethod · 0.95
testFindQuantiles2Method · 0.95

Calls 7

generateUniqueSamplesMethod · 0.95
getProbVecMethod · 0.95
getMethod · 0.65
iteratorMethod · 0.65
valuesMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected