Package prefuse.data.util

Examples of prefuse.data.util.Index


            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((v-m_lo)/span)*breadth;
            set(item, x, b);
        }

        Index index = labels.index(VALUE);
        double step = getLinearStep(span, span==0 ? 0 : breadth/span);
        if ( step == 0 ) step = 1;
        int r;

        for ( double x, v=vlo; v<=m_hi; v+=step ) {
            x = ((v-m_lo)/span)*breadth;
            if ( x < -0.5 ) {
                continue;
            } else if ( (r=index.get(v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
                VisualItem item = labels.addItem();
View Full Code Here


            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
            set(item, x, b);
        }
       
        Index index = labels.index(VALUE);
        double step = getLinearStep(span, breadth/span);
        if ( step == 0 ) step = 1;
        int r;
        for ( double x, v=vlo; v<=m_hi; v+=step ) {
            x = ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
            if ( x < -0.5 ) {
                continue;
            } else if ( (r=index.get(v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
                VisualItem item = labels.addItem();
View Full Code Here

            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((v-m_lo)/span)*breadth;
            set(item, x, b);
        }

        Index index = labels.index(VALUE);
       
        // handle remaining labels
        for ( int r, v=(int)m_lo; v<=m_hi; v+=step ) {
            if ( (r=index.get((double)v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.set(VisualItem.LABEL, model.getObject(v).toString());
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
View Full Code Here

            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((v-m_lo)/span)*breadth;
            set(item, x, b);
        }

        Index index = labels.index(VALUE);
        double step = getLinearStep(span, span==0 ? 0 : breadth/span);
        if ( step == 0 ) step = 1;
        int r;

        for ( double x, v=vlo; v<=m_hi; v+=step ) {
            x = ((v-m_lo)/span)*breadth;
            if ( x < -0.5 ) {
                continue;
            } else if ( (r=index.get(v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
                VisualItem item = labels.addItem();
View Full Code Here

            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
            set(item, x, b);
        }
       
        Index index = labels.index(VALUE);
        double step = getLinearStep(span, breadth/span);
        if ( step == 0 ) step = 1;
        int r;
        for ( double x, v=vlo; v<=m_hi; v+=step ) {
            x = ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
            if ( x < -0.5 ) {
                continue;
            } else if ( (r=index.get(v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
                VisualItem item = labels.addItem();
View Full Code Here

            double v = item.getDouble(VALUE);
            double x = span==0 ? 0.5*breadth : ((v-m_lo)/span)*breadth;
            set(item, x, b);
        }

        Index index = labels.index(VALUE);
       
        // handle remaining labels
        for ( int r, v=(int)m_lo; v<=m_hi; v+=step ) {
            if ( (r=index.get((double)v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.set(VisualItem.LABEL, model.getObject(v).toString());
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
View Full Code Here

     * (lowest to highest) sort order, false for a descending order
     * @return the sorted iterator over rows of this table
     */
    public IntIterator rowsSortedBy(String field, boolean ascend) {
        Class type = getColumnType(field);
        Index index = getIndex(field, type, true);
        int t = ascend ? Index.TYPE_ASCENDING : Index.TYPE_DESCENDING;
        return index.allRows(t);
    }
View Full Code Here

     * {@link prefuse.data.util.Index} class.
     * @return an iterator over a range of table rows, determined by a
     * sorted bounded range of a data field
     */
    public IntIterator rangeSortedBy(String field, int lo, int hi, int indexType) {
        Index index = getIndex(field, int.class, true);
        return index.rows(lo, hi, indexType);
    }
View Full Code Here

     * {@link prefuse.data.util.Index} class.
     * @return an iterator over a range of table rows, determined by a
     * sorted bounded range of a data field
     */
    public IntIterator rangeSortedBy(String field, long lo, long hi, int indexType) {
        Index index = getIndex(field, long.class, true);
        return index.rows(lo, hi, indexType);
    }
View Full Code Here

     * {@link prefuse.data.util.Index} class.
     * @return an iterator over a range of table rows, determined by a
     * sorted bounded range of a data field
     */
    public IntIterator rangeSortedBy(String field, float lo, float hi, int indexType) {
        Index index = getIndex(field, float.class, true);
        return index.rows(lo, hi, indexType);
    }
View Full Code Here

TOP

Related Classes of prefuse.data.util.Index

Copyright © 2018 www.massapicom. 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.