use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.
the class IteratedBufferStressTest method run.
void run() throws Exception {
final Stopwatch totalSW = new Stopwatch();
Geometry base = this.geometryFactory.geometry(this.inputWKT);
double dist = 1.0;
while (true) {
final Geometry b1 = doBuffer(base, dist);
final Geometry b2 = doBuffer(b1, -dist);
dist += 1;
base = b2;
// System.out.println("---------------------- " +
// totalSW.getTimeString());
// System.out.println();
}
}
use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.
the class TestPerfDistanceGeomSet method test.
public void test(final Geometry[] geom) {
final Stopwatch sw = new Stopwatch();
final double dist = 0.0;
for (int i = 0; i < MAX_ITER; i++) {
testAll(geom);
}
if (!this.verbose) {
// System.out.println(sw.getTimeString());
}
if (this.verbose) {
// System.out.println("Finished in " + sw.getTimeString());
// System.out.println(" (Distance = " + dist + ")");
}
}
use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.
the class TestPerfFastDistanceFile method testAllDistances.
void testAllDistances(final List geoms, final int maxToScan) {
final Stopwatch sw = new Stopwatch();
computeAllDistances(geoms, maxToScan);
// computePairDistance(geoms, 1, 3);
// computePairDistance(geoms, 55, 77);
// System.out.println("Count = " + maxToScan + " Finished in "
// + sw.getTimeString());
}
use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.
the class RectangleIntersectsPerfTest method test.
void test(final Collection<Geometry> rect, final Geometry g) {
// System.out.println("Target # pts: " + g.getVertexCount()
// + " -- # Rectangles: " + rect.size());
final int maxCount = MAX_ITER;
final Stopwatch sw = new Stopwatch();
final int count = 0;
for (int i = 0; i < MAX_ITER; i++) {
for (final Geometry element : rect) {
// rect[j].relate(g);
element.intersects(g);
}
}
// System.out.println("Finished in " + sw.getTimeString());
// System.out.println();
}
use of com.revolsys.geometry.util.Stopwatch in project com.revolsys.open by revolsys.
the class DelaunayPerfTest method run.
public void run(final int nPts) {
final List<Point> pts = randomPoints(nPts);
// System.out.println("# pts: " + pts.size());
final Stopwatch sw = new Stopwatch();
final QuadEdgeDelaunayTinBuilder builder = new QuadEdgeDelaunayTinBuilder(GEOMETRY_FACTORY);
builder.insertVertices(pts);
// Geometry g = builder.getEdges(geomFact);
// don't actually form output geometry, to save time and memory
builder.getSubdivision();
// System.out.println(" -- Time: " + sw.getTimeString() + " Mem: "
// + Memory.usedTotalString());
// System.out.println(g);
}
Aggregations