Package prefuse.util.collections

Examples of prefuse.util.collections.DoubleIntSortedMap


                map.put(m_col.getFloat(m_table.getColumnRow(r,idx)), r);
            }
        }
        else if ( m_index instanceof DoubleIntSortedMap )
        {
            DoubleIntSortedMap map = (DoubleIntSortedMap)m_index;
            while ( rows.hasNext() ) {
                int r = rows.nextInt();
                map.put(m_col.getDouble(m_table.getColumnRow(r,idx)), r);
            }
        }
        else if ( m_index instanceof BooleanIntSortedMap )
        {
            BooleanIntSortedMap map = (BooleanIntSortedMap)m_index;
            while ( rows.hasNext() ) {
                int r = rows.nextInt();
                map.put(m_col.getBoolean(m_table.getColumnRow(r,idx)), r);
            }
        }
        else if ( m_index instanceof ObjectIntSortedMap )
        {
            ObjectIntSortedMap map = (ObjectIntSortedMap)m_index;
            while ( rows.hasNext() ) {
                int r = rows.nextInt();
                map.put(m_col.get(m_table.getColumnRow(r,idx)), r);
            }
        }
        else {
            throw new IllegalStateException();
        }
View Full Code Here


            else
                map.remove(key, row);
        }
        else if ( m_index instanceof DoubleIntSortedMap )
        {
            DoubleIntSortedMap map = (DoubleIntSortedMap)m_index;
            double key = m_col.getDouble(crow);
            if ( insert )
                map.put(key, row);
            else
                map.remove(key, row);
        }
        else if ( m_index instanceof BooleanIntSortedMap )
        {
            BooleanIntSortedMap map = (BooleanIntSortedMap)m_index;
            boolean key = m_col.getBoolean(crow);
            if ( insert )
                map.put(key, row);
            else
                map.remove(key, row);
        }
        else if ( m_index instanceof ObjectIntSortedMap )
        {
            ObjectIntSortedMap map = (ObjectIntSortedMap)m_index;
            Object key = m_col.get(crow);
            if ( insert )
                map.put(key, row);
            else
                map.remove(key, row);
        }
        else {
            throw new IllegalStateException();
        }       
    }
View Full Code Here

       
        boolean reverse = (type & Index.TYPE_DESCENDING) > 0;
        boolean linc = (type & Index.TYPE_LEFT_INCLUSIVE) > 0;
        boolean hinc = (type & Index.TYPE_RIGHT_INCLUSIVE) > 0;
       
        DoubleIntSortedMap index = (DoubleIntSortedMap)m_index;
        if ( reverse ) {
            return index.valueRangeIterator(hi, hinc, lo, linc);
        } else {
            return index.valueRangeIterator(lo, linc, hi, hinc);
        }
    }
View Full Code Here

   
    /**
     * @see prefuse.data.util.Index#get(double)
     */
    public int get(double x) {
        DoubleIntSortedMap index = (DoubleIntSortedMap)m_index;
        return index.get(x);
    }
View Full Code Here

TOP

Related Classes of prefuse.util.collections.DoubleIntSortedMap

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.