Package com.googlecode.gaal.suffix.api.IntervalTree

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


            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


    @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() {
        assertArrayEquals(suffixTable, lst.getSuffixTable());
View Full Code Here

    @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() {
        compareChildren(esa.top(), 1, new int[4]);
View Full Code Here

            if (obj == null)
                return false;
            if (!(obj instanceof Interval))
                return false;
            Interval other = (Interval) obj;
            if (lcp != other.lcp())
                return false;
            if (left != other.left())
                return false;
            if (right != other.right())
                return false;
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.