Package org.gephi.data.attributes.type

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


    public void testCreateDynamicObjectMethods() {
        System.out.println("createDynamicObject(AttributeType, Interval)");
        AttributeType type = AttributeType.DYNAMIC_DOUBLE;
        Interval<Double> in = new Interval(1.0, 2.0, 3.0);
        DynamicType result = DynamicUtilities.createDynamicObject(type, in);
        DynamicType expResult = new DynamicDouble(new Interval<Double>(1.0, 2.0, 3.0));
        assertEquals(expResult, result);
        System.out.println("result:    " + result.toString());
        System.out.println("expResult: " + expResult.toString());
        System.out.println();
    }
View Full Code Here


    }

    @Test
    public void testFitToInterval() {
        System.out.println("fitToInterval(DynamicType, double, double)");
        DynamicType expResult = new DynamicDouble(new Interval<Double>(1.0, 2.0, 0.0));
        DynamicType result = DynamicUtilities.fitToInterval(
                new DynamicDouble(new Interval<Double>(1.0, 3.0, 0.0)),
                1.0, 2.0);
        assertEquals(expResult, result);
        System.out.println("result:    " + result.toString());
        System.out.println("expResult: " + expResult.toString());
        System.out.println();
    }
View Full Code Here

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

TOP

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

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.