Search in sources :

Example 6 with Stopwatch

use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.

the class InCirclePerf method runDouble.

public double runDouble(final int nIter) {
    final Stopwatch sw = new Stopwatch();
    for (int i = 0; i < nIter; i++) {
        TriPredicate.isInCircle(this.pa, this.pb, this.pc, this.pp);
    }
    sw.stop();
    // + sw.getTimeString());
    return sw.getTime() / (double) nIter;
}
Also used : Stopwatch(com.revolsys.geometry.util.Stopwatch) Point(com.revolsys.geometry.model.Point)

Example 7 with Stopwatch

use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.

the class InCirclePerf method runDD.

public double runDD(final int nIter) {
    final Stopwatch sw = new Stopwatch();
    for (int i = 0; i < nIter; i++) {
        TriPredicate.isInCircleDD(this.pa, this.pb, this.pc, this.pp);
    }
    sw.stop();
    // + sw.getTimeString());
    return sw.getTime() / (double) nIter;
}
Also used : Stopwatch(com.revolsys.geometry.util.Stopwatch) Point(com.revolsys.geometry.model.Point)

Example 8 with Stopwatch

use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.

the class InCirclePerf method runDDSelf.

public double runDDSelf(final int nIter) {
    final Stopwatch sw = new Stopwatch();
    for (int i = 0; i < nIter; i++) {
        TriPredicate.isInCircleDD2(this.pa, this.pb, this.pc, this.pp);
    }
    sw.stop();
    // + sw.getTimeString());
    return sw.getTime() / (double) nIter;
}
Also used : Stopwatch(com.revolsys.geometry.util.Stopwatch) Point(com.revolsys.geometry.model.Point)

Example 9 with Stopwatch

use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.

the class DDExpressionPerf method runDouble.

public double runDouble(final int nIter) {
    final Stopwatch sw = new Stopwatch();
    for (int i = 0; i < nIter; i++) {
        final double a = 9.0;
        final double factor = 10.0;
        final double aMul = factor * a;
        final double aDiv = a / factor;
        final double det = a * a - aMul * aDiv;
    // System.out.println(det);
    }
    sw.stop();
    // + sw.getTimeString());
    return sw.getTime() / (double) nIter;
}
Also used : Stopwatch(com.revolsys.geometry.util.Stopwatch)

Example 10 with Stopwatch

use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.

the class DDExpressionPerf method xrunDoubleDoubleSelf.

// */
public double xrunDoubleDoubleSelf(final int nIter) {
    final Stopwatch sw = new Stopwatch();
    for (int i = 0; i < nIter; i++) {
        final DD a = new DD(9.0);
        final DD factor = new DD(10.0);
        final DD aMul = factor.multiply(a);
        final DD aDiv = a.divide(factor);
        final DD det = a.multiply(a).subtract(aMul.multiply(aDiv));
    // System.out.println(aDiv);
    // System.out.println(det);
    }
    sw.stop();
    // + sw.getTimeString());
    return sw.getTime() / (double) nIter;
}
Also used : DD(com.revolsys.geometry.math.DD) Stopwatch(com.revolsys.geometry.util.Stopwatch)

Aggregations

Stopwatch (com.revolsys.geometry.util.Stopwatch)30 Point (com.revolsys.geometry.model.Point)14 Geometry (com.revolsys.geometry.model.Geometry)6 QuadEdgeDelaunayTinBuilder (com.revolsys.elevation.tin.quadedge.QuadEdgeDelaunayTinBuilder)3 DD (com.revolsys.geometry.math.DD)3 BoundingBox (com.revolsys.geometry.model.BoundingBox)3 PointDoubleXY (com.revolsys.geometry.model.impl.PointDoubleXY)2 Iterator (java.util.Iterator)2 RectangleLineIntersector (com.revolsys.geometry.algorithm.RectangleLineIntersector)1 PointOnGeometryLocator (com.revolsys.geometry.algorithm.locate.PointOnGeometryLocator)1 SimplePointInAreaLocator (com.revolsys.geometry.algorithm.locate.SimplePointInAreaLocator)1 Interval (com.revolsys.geometry.index.bintree.Interval)1 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)1 Location (com.revolsys.geometry.model.Location)1 BoundingBoxDoubleXY (com.revolsys.geometry.model.impl.BoundingBoxDoubleXY)1 SineStarFactory (com.revolsys.geometry.model.util.SineStarFactory)1 Constructor (java.lang.reflect.Constructor)1 Method (java.lang.reflect.Method)1 BigDecimal (java.math.BigDecimal)1 ArrayList (java.util.ArrayList)1