Examples of TupleSet


Examples of prefuse.data.tuple.TupleSet

   
    /**
     * @see prefuse.action.EncoderAction#setup()
     */
    protected void setup() {
        TupleSet ts = m_vis.getGroup(m_group);
       
        // cache the scale value in case it gets changed due to error
        m_tempScale = m_scale;
       
        if ( m_inferBounds ) {
            if ( m_scale == Constants.QUANTILE_SCALE && m_bins > 0 ) {
                double[] values =
                    DataLib.toDoubleArray(ts.tuples(), m_dataField);
                m_dist = MathLib.quantiles(m_bins, values);
            } else {
                // check for non-binned quantile scale error
                if ( m_scale == Constants.QUANTILE_SCALE ) {
                    Logger.getLogger(getClass().getName()).warning(
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

   
    /**
     * @see prefuse.action.Action#run(double)
     */
    public void run(double frac) {
        TupleSet ts = m_vis.getGroup(m_group);
        setMinMax();
       
        switch ( getDataType(ts) ) {
        case Constants.NUMERICAL:
            numericalLayout(ts);
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

   
    /**
     * Create a new table for representing axis labels.
     */
    protected VisualTable getTable() {
        TupleSet ts = m_vis.getGroup(m_group);
        if ( ts == null ) {
            Schema s = PrefuseLib.getAxisLabelSchema();
            VisualTable vt = m_vis.addTable(m_group, s);
            vt.index(VALUE);
            return vt;
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     */
    public NodeItem getLayoutRoot() {
        if ( m_root != null )
            return m_root;
       
        TupleSet ts = m_vis.getGroup(m_group);
        if ( ts instanceof Graph ) {
            Tree tree = ((Graph)ts).getSpanningTree();
            return (NodeItem)tree.getRoot();
        } else {
            throw new IllegalStateException("This action's data group does" +
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     * @see prefuse.data.expression.Expression#getInt(prefuse.data.Tuple)
     */
    public int getInt(Tuple t) {
        String group = getGroup(t);
        if ( group == null ) { return -1; }
        TupleSet ts = ((VisualItem)t).getVisualization().getGroup(group);
        return ( ts==null ? 0 : ts.getTupleCount() );
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        m_lock = vis;
        m_fields = fields;
        m_autoIndex = autoIndex;
        m_monitorKeys = monitorKeystrokes;

        TupleSet search = vis.getGroup(searchGroup);

        if ( search != null ) {
            if ( search instanceof SearchTupleSet ) {
                m_searcher = (SearchTupleSet)search;
            } else {
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

   
    /**
     * @see prefuse.action.EncoderAction#setup()
     */
    protected void setup() {
        TupleSet ts = m_vis.getGroup(m_group);
       
        // cache the scale value in case it gets changed due to error
        m_tempScale = m_scale;
       
        if ( m_inferBounds ) {
            if ( m_scale == Constants.QUANTILE_SCALE && m_bins > 0 ) {
                double[] values =
                    DataLib.toDoubleArray(ts.tuples(), m_dataField);
                m_dist = MathLib.quantiles(m_bins, values);
            } else {
                // check for non-binned quantile scale error
                if ( m_scale == Constants.QUANTILE_SCALE ) {
                    Logger.getLogger(getClass().getName()).warning(
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

    public void run(double frac) {
        Rectangle2D b = getLayoutBounds();
        double bx = b.getMinX(), by = b.getMinY();
        double w = b.getWidth(), h = b.getHeight();
       
        TupleSet ts = m_vis.getGroup(m_group);
        int m = rows, n = cols;
        if ( analyze ) {
            int[] d = analyzeGraphGrid(ts);
            m = d[0]; n = d[1];
        }
       
        Iterator iter = ts.tuples();
        // layout grid contents
        for ( int i=0; iter.hasNext() && i < m*n; ++i ) {
            VisualItem item = (VisualItem)iter.next();
            item.setVisible(true);
            double x = bx + w*((i%n)/(double)(n-1));
 
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

    private void computeAreas(NodeItem root) {
        int leafCount = 0;
       
        // ensure area data column exists
        Graph g = (Graph)m_vis.getGroup(m_group);
        TupleSet nodes = g.getNodes();
        nodes.addColumns(AREA_SCHEMA);
       
        // reset all sizes to zero
        Iterator iter = new TreeNodeIterator(root);
        while ( iter.hasNext() ) {
            NodeItem n = (NodeItem)iter.next();
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

   
    /**
     * @see prefuse.action.Action#run(double)
     */
    public void run(double frac) {
        TupleSet ts = m_vis.getGroup(m_group);
       
        int nn = ts.getTupleCount();
       
        Rectangle2D r = getLayoutBounds()
        double height = r.getHeight();
        double width = r.getWidth();
        double cx = r.getCenterX();
        double cy = r.getCenterY();

        double radius = m_radius;
        if (radius <= 0) {
            radius = 0.45 * (height < width ? height : width);
        }

        Iterator items = ts.tuples();
        for (int i=0; items.hasNext(); i++) {
            VisualItem n = (VisualItem)items.next();
            double angle = (2*Math.PI*i) / nn;
            double x = Math.cos(angle)*radius + cx;
            double y = Math.sin(angle)*radius + cy;
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.