Examples of aggregate()


Examples of org.apache.accumulo.core.iterators.aggregation.NumSummation.aggregate()

    try {
      NumSummation ns = new NumSummation();
      for (long l = -5l; l < 8l; l++) {
        ns.collect(new Value(NumSummation.longToBytes(l)));
      }
      long l = NumSummation.bytesToLong(ns.aggregate().get());
      assertTrue("l was " + l, l == 13);
     
      ns.collect(new Value(NumSummation.longToBytes(Long.MAX_VALUE)));
      l = NumSummation.bytesToLong(ns.aggregate().get());
      assertTrue("l was " + l, l == Long.MAX_VALUE);
View Full Code Here

Examples of org.apache.giraph.comm.aggregators.OwnerAggregatorServerData.aggregate()

              getSenderTaskId());
        } else {
          Writable aggregatedValue =
              aggregatorData.createAggregatorInitialValue(aggregatorName);
          aggregatedValue.readFields(input);
          aggregatorData.aggregate(aggregatorName, aggregatedValue);
        }
      }
    } catch (IOException e) {
      throw new IllegalStateException("doRequest: " +
          "IOException occurred while processing request", e);
View Full Code Here

Examples of org.apache.giraph.examples.LongSumAggregator.aggregate()

                    sendMsgToAllEdges(
                        new BytesWritable(workerContext.getMessageBytes()));
                    long bytesSent = workerContext.getMessageBytes().length *
                        getNumOutEdges();
                    superstepBytesAggregator.aggregate(bytesSent);
                    superstepMessagesAggregator.aggregate(getNumOutEdges());
                }
            } else {
                voteToHalt();
            }
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.aggregate()

            int i =0;
            for(ArgDef arg : wFn.getArgs())
            {
              args[i++] = arg.getExprEvaluator().evaluate(row);
            }
            fEval.aggregate(aggBuffer, args);
          }
          Object out = fEval.evaluate(aggBuffer);
          WindowFunctionInfo wFnInfo = FunctionRegistry.getWindowFunctionInfo(wFn.getSpec().getName());
          if ( !wFnInfo.isPivotResult())
          {
View Full Code Here

Examples of org.apache.lucene.facet.search.FacetsAggregator.aggregate()

  public List<FacetResult> accumulate(List<MatchingDocs> matchingDocs) throws IOException {

    FacetsAggregator aggregator = getAggregator();
    for (CategoryListParams clp : getCategoryLists()) {
      for (MatchingDocs md : matchingDocs) {
        aggregator.aggregate(md, clp, facetArrays);
      }
    }

    // compute top-K
    List<FacetResult> results = new ArrayList<FacetResult>();
View Full Code Here

Examples of org.apache.lucene.facet.search.aggregator.Aggregator.aggregate()

          continue;
        }
        categorator.setNextDoc(docID, iterator.getScore());
        long ordinal;
        while ((ordinal = categoryList.nextCategory()) <= Integer.MAX_VALUE) {
          categorator.aggregate((int) ordinal);
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.mahout.math.Matrix.aggregate()

        OnlineLogisticRegression model = state.getModels().get(0);
        // finish off pending regularization
        model.close();
       
        Matrix beta = model.getBeta();
        maxBeta = beta.aggregate(Functions.MAX, Functions.ABS);
        nonZeros = beta.aggregate(Functions.PLUS, new DoubleFunction() {
          @Override
          public double apply(double v) {
            return Math.abs(v) > 1.0e-6 ? 1 : 0;
          }
View Full Code Here

Examples of org.apache.mahout.math.Matrix.aggregate()

        // finish off pending regularization
        model.close();
       
        Matrix beta = model.getBeta();
        maxBeta = beta.aggregate(Functions.MAX, Functions.ABS);
        nonZeros = beta.aggregate(Functions.PLUS, new DoubleFunction() {
          @Override
          public double apply(double v) {
            return Math.abs(v) > 1.0e-6 ? 1 : 0;
          }
        });
View Full Code Here

Examples of org.apache.mahout.math.Matrix.aggregate()

          @Override
          public double apply(double v) {
            return Math.abs(v) > 1.0e-6 ? 1 : 0;
          }
        });
        positive = beta.aggregate(Functions.PLUS, new DoubleFunction() {
          @Override
          public double apply(double v) {
            return v > 0 ? 1 : 0;
          }
        });
View Full Code Here

Examples of org.apache.mahout.math.Matrix.aggregate()

          @Override
          public double apply(double v) {
            return v > 0 ? 1 : 0;
          }
        });
        norm = beta.aggregate(Functions.PLUS, Functions.ABS);

        lambda = learningAlgorithm.getBest().getMappedParams()[0];
        mu = learningAlgorithm.getBest().getMappedParams()[1];
      } else {
        maxBeta = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.