Examples of minus()


Examples of org.apache.mahout.matrix.Vector.minus()

   * @param dv a Vector of rectangle sizes
   */
  public static void plotRectangle(Graphics2D g2, Vector v, Vector dv) {
    double[] flip = { 1, -1 };
    Vector v2 = v.clone().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    int h = size / 2;
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2.draw(new Rectangle2D.Double(x * ds, y * ds, dv.get(0) * ds, dv.get(1)
        * ds));
 
View Full Code Here

Examples of org.apache.mahout.matrix.Vector.minus()

   * @param dv a Vector of rectangle sizes
   */
  public static void plotEllipse(Graphics2D g2, Vector v, Vector dv) {
    double[] flip = { 1, -1 };
    Vector v2 = v.clone().assign(new DenseVector(flip), new TimesFunction());
    v2 = v2.minus(dv.divide(2));
    int h = size / 2;
    double x = v2.get(0) + h;
    double y = v2.get(1) + h;
    g2
        .draw(new Ellipse2D.Double(x * ds, y * ds, dv.get(0) * ds, dv.get(1)
View Full Code Here

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

        List<Order> orders = brokerageAccountRepository.findActiveBuyOrders(this);
        for (Order order : orders) {
            OrderEstimate orderEstimate =
                order.calculateOrderEstimate(marketDataService);
            cashAvailable =
                cashAvailable.minus(orderEstimate.getEstimatedValueInclFees());
        }
       
        return cashAvailable;
    }
   
View Full Code Here

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

        // Reduce security available by estimated quantity of sell orders
        List<Order> orders =
            brokerageAccountRepository.findActiveSellOrders(this, symbol);
        for (Order order : orders) {
            securityAvailable = securityAvailable.minus(order.getQuantity());
        }
       
        return securityAvailable;
    }
View Full Code Here

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

   * Applies the derivative of tanh to each of the elements in the vector.  Returns a new matrix.
   */
  public static SimpleMatrix elementwiseApplyTanhDerivative(SimpleMatrix input) {
    SimpleMatrix output = new SimpleMatrix(input.numRows(), input.numCols());
    output.set(1.0);
    output = output.minus(input.elementMult(input));
    return output;
  }

  /**
   * Concatenates several column vectors into one large column
View Full Code Here

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

        SimpleMatrix C = subC.extract();

        if( operationType > 0 )
            return A.mult(B).plus(C).getMatrix();
        else if( operationType < 0 )
            return C.minus(A.mult(B)).getMatrix();
        else
            return A.mult(B).getMatrix();
    }

View Full Code Here

Examples of org.fnlp.ml.types.sv.SparseMatrix.minus()

   * @return 误差
   */
  float computeObjective(SparseMatrix v, SparseMatrix w, SparseMatrix h) {
    SparseMatrix matrixWH = w.mutiplyMatrix(h);
    SparseMatrix diff = v.clone();
    diff.minus(matrixWH);
    return diff.l2Norm();

  }

  SparseMatrix updateH() {
View Full Code Here

Examples of org.gradle.api.file.FileCollection.minus()

                    public Object call() throws Exception {
                        FileCollection runtimeClasspath = project.getConvention().getPlugin(JavaPluginConvention.class)
                                .getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
                        Configuration providedRuntime = project.getConfigurations().getByName(
                                PROVIDED_RUNTIME_CONFIGURATION_NAME);
                        return runtimeClasspath.minus(providedRuntime);
                    }
                }});
            }
        });
       
View Full Code Here

Examples of org.hisrc.jscm.codemodel.expression.JSVariable.minus()

    // Add a return statement to the function body
    factorial.getBody()._return(
        x.le(one).cond(
            one,
            x.mul(factorial.getFunctionExpression().i()
                .args(x.minus(one)))));

    // Write the program code to the System.out
    new CodeWriter(System.out).program(program);

    final Writer stringWriter = new StringWriter();
View Full Code Here

Examples of org.joda.time.DateTime.minus()

    }
  }

  public void removeExpiredUnverifiedAccounts() {
    DateTime currentDate = getCurrentTime();
    Date threshold = currentDate.minus(UnverifiedAccount.EXPIRATION_PERIOD)
        .toDate();

    int removedAccounts = entityManager
        .createQuery(
            "delete " + UnverifiedAccount.class.getName()
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.