Examples of top()


Examples of org.apache.mahout.cf.taste.hadoop.TopItemsQueue.top()

      }
      if (itemsToRecommendFor == null || itemsToRecommendFor.contains(itemID)) {
        float value = (float) element.get();
        if (!Float.isNaN(value)) {

          MutableRecommendedItem topItem = topKItems.top();
          if (value > topItem.getValue()) {
            topItem.set(itemID, value);
            topKItems.updateTop();
          }
        }
View Full Code Here

Examples of org.apache.mahout.cf.taste.hadoop.TopItemsQueue.top()

      @Override
      public boolean apply(int itemID, Vector itemFeatures) {
        if (!alreadyRatedItems.contains(itemID)) {
          double predictedRating = userFeatures.dot(itemFeatures);

          MutableRecommendedItem top = topItemsQueue.top();
          if (predictedRating > top.getValue()) {
            top.set(itemID, (float) predictedRating);
            topItemsQueue.updateTop();
          }
        }
View Full Code Here

Examples of org.apache.olingo.odata2.jpa.processor.core.access.data.JPAPage.JPAPageBuilder.top()

    if (uriParserResultView.getSkip() != null && uriParserResultView.getInlineCount() == null) {
      pageBuilder.skip(uriParserResultView.getSkip().intValue());
    }

    if (uriParserResultView.getTop() != null && uriParserResultView.getInlineCount() == null) {
      pageBuilder.top(uriParserResultView.getTop().intValue());
    }

    JPAPage page = pageBuilder.build();
    oDataJPAContext.setPaging(page);
View Full Code Here

Examples of org.apache.olingo.odata2.jpa.processor.core.access.data.JPAPage.JPAPageBuilder.top()

    if (uriParserResultView.getSkip() != null && uriParserResultView.getInlineCount() == null) {
      pageBuilder.skip(uriParserResultView.getSkip().intValue());
    }

    if (uriParserResultView.getTop() != null && uriParserResultView.getInlineCount() == null) {
      pageBuilder.top(uriParserResultView.getTop().intValue());
    }

    JPAPage page = pageBuilder.build();
    oDataJPAContext.setPaging(page);
View Full Code Here

Examples of org.eclipse.swt.graphics.Rectangle.top()

        f = -Float.parseFloat(y);
        f *= ref.height();
        n = Math.round(f);
      }
     
      rt.top(ref.bottom() - n);
    } else {
      try {
        n = Integer.parseInt(y);
      } catch (NumberFormatException ex) {
        f = Float.parseFloat(y);
View Full Code Here

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.top()

    DocumentElement layer = location.layer;
    Rectangle bounds = widget.getBounds();
    // TopHeight
    if (location.leading != null && location.size != null) {
      if (direction == ResizeDirection.LEADING) {
        int oldTop = bounds.top();
        int deltaHeight = height - bounds.height;
        int top = oldTop - deltaHeight;
        setPixels(location.leading, top);
      }
      setPixels(location.size, height);
View Full Code Here

Examples of org.jf.smali.expectedTokensTestGrammarParser.top()

        CommonTokenStream expectedTokensStream = new CommonTokenStream(expectedTokensLexer);

        expectedTokensTestGrammarParser expectedTokensParser =
                new expectedTokensTestGrammarParser(expectedTokensStream);
        try {
            expectedTokensParser.top();
        } catch (RecognitionException ex) {
            throw new RuntimeException(ex);
        }

        List<ExpectedToken> expectedTokens = expectedTokensParser.getExpectedTokens();
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet.top()

        result.setTextBottom((int) (result.getBaseline() + fm.getDescent()));
       
        RectPropertySet padding = iB.getPadding(c);
        BorderPropertySet border = iB.getBorder(c);
       
        result.setPaintingTop((int)Math.floor(iB.getY() - border.top() - padding.top()));
        result.setPaintingBottom((int)Math.ceil(iB.getY() +
                fm.getAscent() + fm.getDescent() +
                border.bottom() + padding.bottom()));

        return result;
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.RectPropertySet.top()

                    pt = new Point(box.getAbsX(), box.getAbsY());
                } else {
                    RectPropertySet margin = box.getMargin(getLayoutContext());
                    pt = new Point(
                            box.getAbsX() + (int)margin.left(),
                            box.getAbsY() + (int)margin.top());
                }
                scrollTo(pt);
                return;
            }
        }
View Full Code Here

Examples of ptolemy.graph.DirectedAcyclicGraph.top()

            throw new NotSchedulableException(this, "GR graph is not acyclic: "
                    + names.toString());
        }

        if (dag.top() == null) {
            // FIXME: throw exception here
        }

        Schedule schedule = new Schedule();
        Object[] sorted = dag.topologicalSort();
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.