Examples of lcp()


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

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

    @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

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

    @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

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

            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

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

    private void extendToRight(Interval interval, Set<Interval> fillSet) {
        BinaryInterval lptInterval = lpt.search(interval.label().reverse());
        assert (lptInterval != null);
        assert (interval.label().size() == lptInterval.label().size());
        if (!lptMaximalSet.contains(lptInterval)) {
            collectLeftMaximal(lptInterval, lptInterval, interval, lptInterval.lcp(), fillSet);
        }
    }

    private void collectLeftMaximal(BinaryInterval interval, Interval parent, Interval lstInterval, int parentLcp,
            Set<Interval> fillSet) {
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.