Examples of plus()


Examples of org.apache.derby.iapi.types.SQLInteger.plus()

    // to SQLInteger.
    SQLInteger increment = (SQLInteger) insertRow[columnId];
    SQLInteger sum = (SQLInteger) existingRow[columnId];

    // Perform the aggregation.
    sum.plus(sum, increment, sum);

    return null;
  }

  public void addToFreeList(

Examples of org.apache.derby.iapi.types.SQLInteger.plus()

    // to SQLInteger.
    SQLInteger increment = (SQLInteger) insertRow[columnId];
    SQLInteger sum = (SQLInteger) existingRow[columnId];

    // Perform the aggregation.
    sum.plus(sum, increment, sum);

    return null;
  }

  public void addToFreeList(

Examples of org.apache.fop.traits.MinOptMax.plus()

    private MinOptMax sum(MinOptMax[] lengths) {
        MinOptMax sum = MinOptMax.ZERO;
        for (int i = 0; i < lengths.length; i++) {
            if (lengths[i] != null) {
                sum = sum.plus(lengths[i]);
            }
        }
        return sum;
    }

Examples of org.apache.mahout.math.DenseMatrix.plus()


    Matrix m2 = MatrixUtils.exp( m1 );


    Matrix denom = ones.plus( m2 );
    Matrix out = MatrixUtils.div(ones, denom);



    return out;

Examples of org.apache.mahout.math.DenseVector.plus()

        List<ClusterObservations> values = combinerWriter.getValue(key);
        assertEquals("too many values", 1, values.size());
        ClusterObservations info = values.get(0);

        count += info.getS0();
        total = total.plus(info.getS1());
      }
      assertEquals("total points", 9, count);
      assertEquals("point total[0]", 27, (int) total.get(0));
      assertEquals("point total[1]", 27, (int) total.get(1));
    }

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

    assertEquals(0, m.minus(a).aggregate(Functions.PLUS, Functions.ABS), 1.0e-10);
    print(m);

    assertEquals(0, m.transpose().times(m).minus(a.transpose().times(a)).aggregate(
        Functions.PLUS, Functions.ABS), 1.0e-10);
    assertEquals(0, m.plus(m).minus(a.plus(a)).aggregate(Functions.PLUS, Functions.ABS), 1.0e-10);
  }

  private static void print(Matrix m) {
    for (int i = 0; i < m.rowSize(); i++) {
      for (int j = 0; j < m.columnSize(); j++) {

Examples of org.apache.mahout.math.Vector.plus()

      Context context) throws IOException, InterruptedException {

    Vector recommendationVector = null;
    for (VectorWritable vectorWritable : values) {
      recommendationVector = recommendationVector == null ? vectorWritable
          .get() : recommendationVector.plus(vectorWritable.get());
    }

    Queue<RecommendedItem> topItems = new PriorityQueue<RecommendedItem>(
        recommendationsPerUser + 1,
        Collections.reverseOrder(ByValueRecommendedItemComparator

Examples of org.apache.mahout.math.Vector.plus()

     * so the computation is much simpler */
    Vector predictionVector = null;
    for (PrefAndSimilarityColumnWritable prefAndSimilarityColumn : values) {
      predictionVector = predictionVector == null
          ? prefAndSimilarityColumn.getSimilarityColumn()
          : predictionVector.plus(prefAndSimilarityColumn.getSimilarityColumn());
    }

    Iterator<Vector.Element> predictions = predictionVector.iterateNonZero();
    List<RecommendedItem> recommendations = new ArrayList<RecommendedItem>();
    while (predictions.hasNext() && recommendations.size() < recommendationsPerUser) {

Examples of org.apache.mahout.math.Vector.plus()

        List<ClusterObservations> values = combinerWriter.getValue(key);
        assertEquals("too many values", 1, values.size());
        ClusterObservations info = values.get(0);

        count += info.getS0();
        total = total.plus(info.getS1());
      }
      assertEquals("total points", 9, count);
      assertEquals("point total[0]", 27, (int) total.get(0));
      assertEquals("point total[1]", 27, (int) total.get(1));
    }

Examples of org.apache.mahout.matrix.DenseVector.plus()

        assertEquals("too many values", 1, values.size());
        String value = values.get(0).toString();

        String[] pointInfo = value.split("\t");
        count += Integer.parseInt(pointInfo[0]);
        total = total.plus(AbstractVector.decodeVector(pointInfo[1]));
      }
      assertEquals("total points", 9, count);
      assertEquals("point total[0]", 27, (int) total.get(0));
      assertEquals("point total[1]", 27, (int) total.get(1));
    }
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.