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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations