Package org.gephi.data.attributes.type

Examples of org.gephi.data.attributes.type.DynamicFloat


                    for (Interval interval : out) {
                        lout.add(new Interval<Float>(interval.getLow(), interval.getHigh(),
                                interval.isLowExcluded(), interval.isHighExcluded(), (Float) interval.getValue()));
                    }
                }
                return new DynamicFloat((DynamicFloat) source, lin, lout);
            }
            case DYNAMIC_DOUBLE: {
                ArrayList<Interval<Double>> lin = null;
                if (in != null) {
                    lin = new ArrayList<Interval<Double>>();
View Full Code Here


        }

        //Dynamic Weight
        AttributeColumn dynamicWeightCol = container.getAttributeModel().getEdgeTable().getColumn(PropertiesColumn.EDGE_WEIGHT.getTitle(), AttributeType.DYNAMIC_FLOAT);
        if (dynamicWeightCol != null) {
            DynamicFloat weight = (DynamicFloat) edgeDraft.getAttributeRow().getValue(dynamicWeightCol.getIndex());
            AttributeRow row = (AttributeRow) edge.getEdgeData().getAttributes();
            if (weight == null) {
                row.setValue(PropertiesColumn.EDGE_WEIGHT.getIndex(), new DynamicFloat(new Interval<Float>(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, edgeDraft.getWeight())));
            } else {
                row.setValue(PropertiesColumn.EDGE_WEIGHT.getIndex(), weight);
            }
        }
    }
View Full Code Here

                        EdgeDraft edgeDraft = container.factory().newEdgeDraft();
                        edgeDraft.setSource(node1);
                        edgeDraft.setTarget(node2);

                        Random r = new Random();
                        DynamicFloat dynamicWeight = new DynamicFloat(new Interval<Float>(2010, 2012, false, true, new Float(r.nextInt(3)+1)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2012, 2014, false, true, new Float(r.nextInt(3)+2)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2014, 2016, false, true, new Float(r.nextInt(3)+3)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2016, 2018, false, true, new Float(r.nextInt(3)+4)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2018, 2020, false, true, new Float(r.nextInt(3)+5)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2020, 2022, false, true, new Float(r.nextInt(3)+6)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2022, 2024, false, true, new Float(r.nextInt(3)+7)));
                        dynamicWeight = new DynamicFloat(dynamicWeight, new Interval<Float>(2024, 2026, false, false, new Float(r.nextInt(3)+8)));
                        edgeDraft.addAttributeValue(weightCol, dynamicWeight);

                        container.addEdge(edgeDraft);
                    }
                }
View Full Code Here

TOP

Related Classes of org.gephi.data.attributes.type.DynamicFloat

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.