Examples of Weight


Examples of cleo.search.util.Weight

    int numBrowseHits = 0;
    int numFilterHits = 0;
    int numResultHits = 0;
   
    Weight w = new Weight(0, 0);
    SelectorContext ctx = new SelectorContext();
   
    while(connStrengthIter.hasNext()) {
      numBrowseHits++;
      connStrengthIter.next(w);

Examples of com.alibaba.dubbo.registry.common.domain.Weight

            }
        }
       
        for(String aimService : aimServices) {
            for (String a : addresses) {
                Weight wt = new Weight();
                wt.setUsername((String)context.get("operator"));
                wt.setAddress(Tool.getIP(a));
                wt.setService(aimService);
                wt.setWeight(w);
                overrideService.saveOverride(OverrideUtils.weightToOverride(wt));
            }
        }
        return true;
    }

Examples of com.almende.eve.entity.Weight

    // calculate solutions
    List<Weight> solutions = calculateSolutions();
    if (solutions.size() > 0) {
      // there are solutions. yippie!
      Weight solution = solutions.get(0);
      if (activityInterval == null ||
          !solution.getInterval().equals(activityInterval)) {
        // interval is changed, save new interval
        Status status = activity.withStatus();
        status.setStart(solution.getStart().toString());
        status.setEnd(solution.getEnd().toString());
        status.setActivityStatus(Status.ACTIVITY_STATUS.planned);
        status.setUpdated(DateTime.now().toString());
        state.put("activity", activity);
        logger.info("Activity replanned at " + solution.toString()); // TODO: cleanup logging
        try {
          // TODO: cleanup
          logger.info("Replanned activity: " + JOM.getInstance().writeValueAsString(activity));
        } catch (Exception e) {}
        return true;

Examples of com.krminc.phr.domain.vitals.Weight

                throw new WebApplicationException(Response.Status.PRECONDITION_FAILED);
            }

            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            Weight entity = data.resolveEntity(em);
            createEntity(data.resolveEntity(em));
            persistenceSvc.commitTx();
            return Response.created(uriInfo.getAbsolutePath().resolve(entity.getWeightId() + "/")).build();
        } finally {
            persistenceSvc.close();
        }
    }

Examples of com.monkygames.wox.health.data.Weight

    /**
     * A Blocking method that returns the weight.
     * @return the weight that was calculated and null on error.
     **/
    public Weight getWeight(){
  Weight weight = new Weight();
  samplePointer = 0;
  doMeasure = true;
  doTare = false;
  isMeasured = false;
  // need to wait for it to complete

Examples of com.taobao.tddl.jdbc.group.config.Weight

  private final int dataSourceIndex;//DataSourceIndex��ָ���DataSource��Group�е�λ��

  public DataSourceWrapper(String dataSourceKey, String weightStr, DataSource wrappedDataSource, DBType dbType,
      int dataSourceIndex) {
    this.dataSourceKey = dataSourceKey;
    this.weight = new Weight(weightStr);
    this.weightStr = weightStr;
    this.wrappedDataSource = wrappedDataSource;
    this.dbType = dbType;

    this.dataSourceIndex = dataSourceIndex;

Examples of it.unimi.dsi.mg4j.query.nodes.Weight

  public void tearDown() {
    for( File f: new File( basename ).getParentFile().listFiles( (FileFilter)new PrefixFileFilter( new File( basename ).getName() ) ) )  f.delete();
  }

  public void testWeights() throws QueryBuilderVisitorException, IOException {
    Query query = new Weight( 0.5, new And( new Term( "a" ), new Term( "b" ) ) );
    DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( null, index, Integer.MAX_VALUE );
    DocumentIterator documentIterator = query.accept( documentIteratorBuilderVisitor );
    assertEquals( .5, documentIterator.weight(), 0 );
    documentIterator.dispose();

    query = new Weight( .1, new Weight( 0.5, new And( new Weight( .2, new Term( "a" ) ), new Term( "b" ) ) ) );
    documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( null, index, Integer.MAX_VALUE );
    documentIterator = query.accept( documentIteratorBuilderVisitor );
    assertEquals( .5, documentIterator.weight(), 0 );
    documentIterator.dispose();
}

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        final PointVectorValuePair optimum
            = optimizer.optimize(new MaxEval(maxEval),
                                 model.getModelFunction(),
                                 model.getModelFunctionJacobian(),
                                 new Target(target),
                                 new Weight(weights),
                                 new InitialGuess(initialGuess));
        // Extract the coefficients.
        return optimum.getPointRef();
    }

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        PointVectorValuePair optimum =
            optimizer.optimize(new MaxEval(100),
                               problem.getModelFunction(),
                               problem.getModelFunctionJacobian(),
                               problem.getTarget(),
                               new Weight(new double[] { 1, 1, 1, 1, 1 }),
                               new InitialGuess(new double[] { 2, 2, 2, 2, 2, 2 }));
        Assert.assertEquals(0, optimizer.getRMS(), 1e-10);
        Assert.assertEquals(3, optimum.getPointRef()[2], 1e-10);
        Assert.assertEquals(4, optimum.getPointRef()[3], 1e-10);
        Assert.assertEquals(5, optimum.getPointRef()[4], 1e-10);

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        PointVectorValuePair optimum =
            optimizer.optimize(new MaxEval(100),
                               problem.getModelFunction(),
                               problem.getModelFunctionJacobian(),
                               problem.getTarget(),
                               new Weight(new double[] { 1, 1, 1 }),
                               new InitialGuess(new double[] { 1, 1 }));
        Assert.assertEquals(0, optimizer.getRMS(), 1e-10);
        Assert.assertEquals(2, optimum.getPointRef()[0], 1e-10);
        Assert.assertEquals(1, optimum.getPointRef()[1], 1e-10);
    }
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.