154155156157158159160161162163164
return; } Vector accumulator = new RandomAccessSparseVector(it.next().get()); while (it.hasNext()) { Vector row = it.next().get(); row.addTo(accumulator); } out.collect(rowNum, new VectorWritable(new SequentialAccessSparseVector(accumulator))); } }
166167168169170171172173174175176
s0 += weight; Vector weightedX = x.times(weight); if (s1 == null) { s1 = weightedX; } else { weightedX.addTo(s1); } Vector x2 = x.times(x).times(weight); if (s2 == null) { s2 = x2; } else {
172173174175176177178179180181182
} Vector x2 = x.times(x).times(weight); if (s2 == null) { s2 = x2; } else { x2.addTo(s2); } } } public void observe(Vector x) {
188189190191192193194195196197198
} Vector x2 = x.times(x); if (s2 == null) { s2 = x2; } else { x2.addTo(s2); } } @Override public long getNumPoints() {
6667686970717273747576
7273747576777879808182
} Vector x2 = x.times(x).times(weight); if (s2 == null) { s2 = x2; } else { x2.addTo(s2); } } @Override public void compute() {