Package com.thinkaurelius.titan.graphdb.database.serialize.attribute

Examples of com.thinkaurelius.titan.graphdb.database.serialize.attribute.DoubleSerializer


                fail();
            } catch (IllegalArgumentException e) {}
        }

        double[] dvalues = { 0.12574, 2342332.12574, 35.123456, 24321.692953};
        DoubleSerializer ds = new DoubleSerializer();
        for (double d : dvalues) {
            ds.verifyAttribute(d);
            assertEquals(d,DoubleSerializer.convert(DoubleSerializer.convert(d)),DoubleSerializer.EPSILON);
        }

        dvalues = new double[]{ 1e13, -1e13, DoubleSerializer.MIN_VALUE*10, DoubleSerializer.MAX_VALUE*10};
        for (double d : dvalues) {
            try {
                ds.verifyAttribute(d);
                fail();
            } catch (IllegalArgumentException e) {}
        }
    }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.graphdb.database.serialize.attribute.DoubleSerializer

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.