Package prefuse.data.util

Examples of prefuse.data.util.Index.rows()


     * @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);
    }
   
    /**
     * Return an iterator over a range of rwos in this table, determined
     * by a bounded range for a given data field. A new index over the
View Full Code Here


     * @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);
    }
   
    /**
     * Return an iterator over a range of rwos in this table, determined
     * by a bounded range for a given data field. A new index over the
View Full Code Here

     * @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);
    }
   
    /**
     * Return an iterator over a range of rwos in this table, determined
     * by a bounded range for a given data field. A new index over the
View Full Code Here

     * @return an iterator over a range of table rows, determined by a
     * sorted bounded range of a data field
     */
    public IntIterator rangeSortedBy(String field, double lo, double hi, int indexType) {
        Index index = getIndex(field, double.class, true);
        return index.rows(lo, hi, indexType);
    }
   
    /**
     * Return an iterator over a range of rwos in this table, determined
     * by a bounded range for a given data field. A new index over the
View Full Code Here

        Class type = TypeLib.getSharedType(lo, hi);
        // TODO: check this for correctness
        if ( type == null )
            throw new IllegalArgumentException("Incompatible arguments");
        Index index = getIndex(field, type, true);
        return index.rows(lo, hi, indexType);
    }
   
    // ------------------------------------------------------------------------
    // Listener Methods
   
View Full Code Here

     * @param update indicates whether or not to fire a table update
     */
    protected void clearAggregateMappings(int row, boolean update) {
        Index index = m_aggregated.index(AGGREGATE);
        boolean fire = false;
        for ( IntIterator rows = index.rows(row); rows.hasNext(); ) {
            int r = rows.nextInt();
            // this removal maneuver is ok because we know we are
            // pulling row values directly from an index
            // with intervening iterators, remove might throw an exception
            rows.remove();
View Full Code Here

        if ( ar < 0 ) {
            return -1;
        } else if ( m_aggregated.getInt(ar, AGGREGATE) == row ) {
            return ar;
        } else {
            for ( IntIterator rows = index.rows(hash); rows.hasNext(); ) {
                ar = rows.nextInt();
                if ( m_aggregated.getInt(ar, AGGREGATE) == row )
                    return ar;
            }
            return -1;
View Full Code Here

        private IntIterator m_rows;
        private Tuple m_next = null;

        public AggregatedIterator(int row) {
            Index index = m_aggregated.index(AGGREGATE);
            m_rows = index.rows(row);
            advance();
        }
        public boolean hasNext() {
            return m_next != null;
        }
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.