Examples of plus()


Examples of org.apache.mahout.matrix.Vector.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));
    }

Examples of org.archfirst.common.money.Money.plus()

   
    @Transient
    public Money getTotalPriceOfExecutions() {
        Money totalPrice = new Money("0.00");
        for (Execution execution : executions) {
            totalPrice = totalPrice.plus(
                    execution.getPrice().times(execution.getQuantity()));
        }
        return totalPrice.scaleToCurrency();
    }
   

Examples of org.archfirst.common.quantity.DecimalQuantity.plus()

   
    @Transient
    public DecimalQuantity getCumQtyOfExecutions() {
        DecimalQuantity total = new DecimalQuantity();
        for (Execution execution : executions) {
            total = total.plus(execution.getQuantity());
        }
        return total;
    }
   
    @Transient

Examples of org.eigenbase.relopt.RelTraitSet.plus()

  }

  public RelTraitSet newTraitSet(RelTrait... traits){
    RelTraitSet set = call.getPlanner().emptyTraitSet();
    for(RelTrait t : traits){
      set = set.plus(t);
    }
    return set;

  }

Examples of org.ejml.simple.SimpleMatrix.plus()

   */
  private SimpleMatrix randomContextMatrix() {
    SimpleMatrix matrix = new SimpleMatrix(numRows, numCols * 2);
    matrix.insertIntoThis(0, 0, identity.scale(op.trainOptions.scalingForInit * 0.1));
    matrix.insertIntoThis(0, numCols, identity.scale(op.trainOptions.scalingForInit * 0.1));
    matrix = matrix.plus(SimpleMatrix.random(numRows,numCols * 2,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand));
    return matrix;
  }

  /**
   * Create a random transform matrix based on the initialization

Examples of org.ejml.simple.SimpleMatrix.plus()

                // extract the submatrix of A which is being operated on
                SimpleMatrix A_small = QR.extractMatrix(i,END,i,END);

                // A = (I - &gamma;*u*u<sup>T</sup>)A
                A_small = A_small.plus(-gamma,v.mult(v.transpose()).mult(A_small));

                // save the results
                QR.insertIntoThis(i,i,A_small);
                QR.insertIntoThis(i+1,i,v.extractMatrix(1,END,0,1));

Examples of org.encog.ml.data.basic.BasicMLData.plus()

  public MLData evaluate(ArrayList<MLData> outputs) {
    int outputSize = outputs.get(0).size();
    BasicMLData acc = new BasicMLData(outputSize);
    for (MLData out: outputs)
    {
      acc = (BasicMLData) acc.plus(out);
    }

    acc = (BasicMLData) acc.times(1.0 / outputs.size());
    return   acc;

Examples of org.exist.xquery.value.AbstractDateTimeValue.plus()

        // loop through dates/times
        while(count-- > 0)
        {
          result.add(d1);
          d1 = (AbstractDateTimeValue)d1.plus(diff);
        }

        return result;
    }
}

Examples of org.exist.xquery.value.ComputableValue.plus()

                    }
                }
                try {
                    sum = (ComputableValue) sum.promote(value);
                    //Aggregate next values 
                    sum = sum.plus((ComputableValue) value);
                } catch(final XPathException e) {
                    throw new XPathException(this, ErrorCodes.FORG0006, e.getMessage());
                }
            }
            result = sum.div(new IntegerValue(inner.getItemCount()));

Examples of org.fnlp.ml.types.sv.HashSparseVector.plus()

    Iterator i = insts.iterator();

    while (i.hasNext()) {
      Instance d = (Instance) i.next();

      centroid.plus((HashSparseVector) d.getData());
    }
    centroid.scaleDivide(insts.size());

    return centroid;
  }
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.