Examples of right()


Examples of aima.core.util.datastructure.XYLocation.right()

  public void testSimpleHorizontalAttack() {
    XYLocation loc = new XYLocation(0, 0);
    board.addQueenAt(loc);
    Assert.assertEquals(0, board.getNumberOfAttacksOn(loc));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(1, 0)));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.right()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(7, 0)));
  }

  @Test
  public void testSimpleVerticalAttack() {
View Full Code Here

Examples of cc.redberry.core.tensor.Expression.right()

    @Override
    public Tensor transform(Tensor tensor) {
        if (tensor instanceof Expression) {
            Expression e = (Expression) tensor;
            return new Expression(transform(e.left()), e.right());
        }
        return transform(tensor, createIndexGenerator(tensor), indices);
    }
}
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.Table.right()

  Table fpsContainer = new Table();
  fpsContainer.setFillParent(true);
  if (alignment.getKey().equals(Align.left))
    fpsContainer.left();
  else
    fpsContainer.right();
  if (alignment.getValue().equals(Align.top))
    fpsContainer.top();
  else
    fpsContainer.bottom();
  fpsContainer.add(new Label("FPS: NaN", R2Assets.R2Skin));
View Full Code Here

Examples of com.google.gwt.safecss.shared.SafeStylesBuilder.right()

        GQuery containerTemp =
                $(ChozenTemplate.templates.container(containerId, cssClasses).asString()).width(fWidth);

        final SafeStylesBuilder ssb = new SafeStylesBuilder();
        if (isRTL) {
            ssb.right(HORIZONTAL_OFFSET, Style.Unit.PX);
        } else {
            ssb.left(HORIZONTAL_OFFSET, Style.Unit.PX);
        }
        ssb.top(VERTICAL_OFFSET, Style.Unit.PX);
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.IntervalTree.Interval.right()

        while (iterator.hasNext()) {
            Interval node = iterator.next();
            Integer style = styleMap.get(node);
            if (style != null) {
                NodeStyle nodeStyle = TikzConstants.CELL_STYLES[style];
                for (int i = node.left(); i <= node.right(); i++) {
                    IntSequence subSequence = sequence.subSequence(suffixTable[i], suffixTable[i] + node.lcp());
                    for (int j = 0; j < subSequence.size(); j++) {
                        if (!usedCells[i][j]) {
                            usedCells[i][j] = true;
                            drawing.drawCell(i, j, symbolTable.toToken(subSequence.get(j)).toString(), nodeStyle);
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.IntervalTree.Interval.right()

    @Test
    public void testGetTop() {
        Interval top = lst.top();
        assertTrue(top.left() == 0);
        assertTrue(top.right() == text.length - 1);
        assertTrue(top.lcp() == 0);
    }

    @Test
    public void testGetSuffixTable() {
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.IntervalTree.Interval.right()

    @Test
    public void testTop() {
        Interval top = esa.top();
        assertTrue(top.left() == 0);
        assertTrue(top.right() == text.length - 1);
        assertTrue(top.lcp() == 0);
    }

    @Test
    public void testChildIterator() {
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.IntervalTree.Interval.right()

            Interval other = (Interval) obj;
            if (lcp != other.lcp())
                return false;
            if (left != other.left())
                return false;
            if (right != other.right())
                return false;
            return true;
        }
    }
}
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.IntervalTree.Interval.right()

                fail("right context not found");
            } else {
                NavigableSet<Integer> leftIndices = intervalIndices(leftInterval);
                int[] suffixTable = lst.getSuffixTable();
                expectedSet = new HashMultiset<IntSequence>();
                for (int i = rightInterval.left(); i <= rightInterval.right(); i++) {
                    int end = suffixTable[i];
                    Integer start = leftIndices.floor(end);
                    if (start != null && end - start < WINDOW_SIZE) {
                        IntSequence fillerSeq = lst.getSequence().subSequence(start, end);
                        boolean hasSpecial = false;
View Full Code Here

Examples of com.googlecode.gaal.suffix.api.LinearizedSuffixTree.BinaryInterval.right()

            if (!interval.isTerminal()) {
                if (maximalSet.contains(interval) != isMaximal(interval)) {
                    System.err.printf("%s - got:%s, expected:%s\n", interval, maximalSet.contains(interval),
                            isMaximal(interval));
                    int[] lcpTable = lst.getLcpTable();
                    for (int i = interval.left(); i <= interval.right(); i++) {
                        System.err.print(lcpTable[i]);
                    }
                    System.err.println();
                    fail("maximality mismatch");
                }
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.