_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q154700 | RelationalOperations.polygonTouchesMultiPoint_ | train | private static boolean polygonTouchesMultiPoint_(Polygon polygon_a,
MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint,
// or if one is contained in the other.
int relation = tryRasterizedContainsOrDisjoint_(p... | java | {
"resource": ""
} |
q154701 | RelationalOperations.polygonContainsMultiPoint_ | train | private static boolean polygonContainsMultiPoint_(Polygon polygon_a,
MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polygon_a.queryEnvelope2D(env_a);
multipoint_b.queryEnvelope2D(env_b);
// Quick envelope rejec... | java | {
"resource": ""
} |
q154702 | RelationalOperations.polygonEqualsEnvelope_ | train | private static boolean polygonEqualsEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polygon_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
// Quick envelope rejection test ... | java | {
"resource": ""
} |
q154703 | RelationalOperations.polygonDisjointEnvelope_ | train | private static boolean polygonDisjointEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint,
// or if one is contained in the other.
int relation = tryRasterizedContainsOrDisjoint_(polygo... | java | {
"resource": ""
} |
q154704 | RelationalOperations.polygonTouchesEnvelope_ | train | private static boolean polygonTouchesEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint,
// or if one is contained in the other.
int relation = tryRasterizedContainsOrDisjoint_(polygon... | java | {
"resource": ""
} |
q154705 | RelationalOperations.polygonOverlapsEnvelope_ | train | private static boolean polygonOverlapsEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint,
// or if one is contained in the other.
int relation = tryRasterizedContainsOrDisjoint_(polygo... | java | {
"resource": ""
} |
q154706 | RelationalOperations.polygonWithinEnvelope_ | train | private static boolean polygonWithinEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polygon_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
return envelopeInfContainsEnvelope... | java | {
"resource": ""
} |
q154707 | RelationalOperations.polygonContainsEnvelope_ | train | private static boolean polygonContainsEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick envelope rejection test
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polygon_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b)... | java | {
"resource": ""
} |
q154708 | RelationalOperations.polygonCrossesEnvelope_ | train | private static boolean polygonCrossesEnvelope_(Polygon polygon_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polygon_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (envelopeInfContainsEnvelope_... | java | {
"resource": ""
} |
q154709 | RelationalOperations.polylineEqualsPolyline_ | train | private static boolean polylineEqualsPolyline_(Polyline polyline_a,
Polyline polyline_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
polyline_b.queryEnvelope2D(env_b);
// Quick envelope rejection t... | java | {
"resource": ""
} |
q154710 | RelationalOperations.polylineDisjointPolyline_ | train | private static boolean polylineDisjointPolyline_(Polyline polyline_a,
Polyline polyline_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, polyline_b, tolerance,
false) == Relatio... | java | {
"resource": ""
} |
q154711 | RelationalOperations.polylineTouchesPolyline_ | train | private static boolean polylineTouchesPolyline_(Polyline polyline_a,
Polyline polyline_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, polyline_b, tolerance,
false) == Relation... | java | {
"resource": ""
} |
q154712 | RelationalOperations.polylineOverlapsPolyline_ | train | private static boolean polylineOverlapsPolyline_(Polyline polyline_a,
Polyline polyline_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, polyline_b, tolerance,
false) == Relatio... | java | {
"resource": ""
} |
q154713 | RelationalOperations.polylineContainsPolyline_ | train | private static boolean polylineContainsPolyline_(Polyline polyline_a,
Polyline polyline_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
polyline_b.queryEnvelope2D(env_b);
// Quick envelope rejection... | java | {
"resource": ""
} |
q154714 | RelationalOperations.polylineDisjointPoint_ | train | private static boolean polylineDisjointPoint_(Polyline polyline_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, point_b, tolerance,
false) == Relation.disjoint)
... | java | {
"resource": ""
} |
q154715 | RelationalOperations.polylineTouchesPoint_ | train | private static boolean polylineTouchesPoint_(Polyline polyline_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, point_b, tolerance,
false) == Relation.disjoint)
r... | java | {
"resource": ""
} |
q154716 | RelationalOperations.polylineContainsPoint_ | train | private static boolean polylineContainsPoint_(Polyline polyline_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, point_b, tolerance,
false) == Relation.disjoint)
... | java | {
"resource": ""
} |
q154717 | RelationalOperations.polylineDisjointMultiPoint_ | train | private static boolean polylineDisjointMultiPoint_(Polyline polyline_a,
MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, multipoint_b,
tolerance, false) ==... | java | {
"resource": ""
} |
q154718 | RelationalOperations.polylineContainsMultiPoint_ | train | private static boolean polylineContainsMultiPoint_(Polyline polyline_a,
MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
multipoint_b.queryEnvelope2D(env_b);
if (!envelopeInfCon... | java | {
"resource": ""
} |
q154719 | RelationalOperations.polylineEqualsEnvelope_ | train | private static boolean polylineEqualsEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (env_b.getHeight() > toler... | java | {
"resource": ""
} |
q154720 | RelationalOperations.polylineDisjointEnvelope_ | train | private static boolean polylineDisjointEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (envelopeInfContainsEnve... | java | {
"resource": ""
} |
q154721 | RelationalOperations.polylineTouchesEnvelope_ | train | private static boolean polylineTouchesEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (env_b.getHeight() <= tol... | java | {
"resource": ""
} |
q154722 | RelationalOperations.polylineOverlapsEnvelope_ | train | private static boolean polylineOverlapsEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (envelopeInfContainsEnve... | java | {
"resource": ""
} |
q154723 | RelationalOperations.polylineWithinEnvelope_ | train | private static boolean polylineWithinEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (!envelopeInfContainsEnvel... | java | {
"resource": ""
} |
q154724 | RelationalOperations.polylineContainsEnvelope_ | train | private static boolean polylineContainsEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
envelope_b.queryEnvelope2D(env_b);
polyline_a.queryEnvelope2D(env_a);
if (!envelopeInfContainsEnv... | java | {
"resource": ""
} |
q154725 | RelationalOperations.polylineCrossesEnvelope_ | train | private static boolean polylineCrossesEnvelope_(Polyline polyline_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
polyline_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (envelopeInfContainsEnvel... | java | {
"resource": ""
} |
q154726 | RelationalOperations.multiPointEqualsMultiPoint_ | train | private static boolean multiPointEqualsMultiPoint_(MultiPoint multipoint_a,
MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
multipoint_b.queryEnvelope2D(env_b);
if (!envelope... | java | {
"resource": ""
} |
q154727 | RelationalOperations.multiPointDisjointMultiPoint_ | train | private static boolean multiPointDisjointMultiPoint_(
MultiPoint multipoint_a, MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
return !multiPointIntersectsMultiPoint_(multipoint_a, multipoint_b,
tolerance, progress_tracker);
} | java | {
"resource": ""
} |
q154728 | RelationalOperations.multiPointOverlapsMultiPoint_ | train | private static boolean multiPointOverlapsMultiPoint_(
MultiPoint multipoint_a, MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
return multiPointCoverageMultiPoint_(multipoint_a, multipoint_b,
tolerance, false, false, true, progress_tracker);
} | java | {
"resource": ""
} |
q154729 | RelationalOperations.multiPointContainsMultiPoint_ | train | private static boolean multiPointContainsMultiPoint_(
MultiPoint multipoint_a, MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
multipoint_b.queryEnvelope2D(env_b);
if (!envel... | java | {
"resource": ""
} |
q154730 | RelationalOperations.multiPointEqualsPoint_ | train | static boolean multiPointEqualsPoint_(MultiPoint multipoint_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
point_b.queryEnvelope2D(env_b);
return envelopeEqualsEnvelope_(env_a, env_b, ... | java | {
"resource": ""
} |
q154731 | RelationalOperations.multiPointDisjointPoint_ | train | private static boolean multiPointDisjointPoint_(MultiPoint multipoint_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
Point2D pt_b = point_b.getXY();
return multiPointDisjointPointImpl_(multipoint_a, pt_b, tolerance,
progress_tracker);
} | java | {
"resource": ""
} |
q154732 | RelationalOperations.multiPointWithinPoint_ | train | private static boolean multiPointWithinPoint_(MultiPoint multipoint_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
return multiPointEqualsPoint_(multipoint_a, point_b, tolerance,
progress_tracker);
} | java | {
"resource": ""
} |
q154733 | RelationalOperations.multiPointContainsPoint_ | train | private static boolean multiPointContainsPoint_(MultiPoint multipoint_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
return !multiPointDisjointPoint_(multipoint_a, point_b, tolerance,
progress_tracker);
} | java | {
"resource": ""
} |
q154734 | RelationalOperations.multiPointEqualsEnvelope_ | train | private static boolean multiPointEqualsEnvelope_(MultiPoint multipoint_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (env_b.getHeight()... | java | {
"resource": ""
} |
q154735 | RelationalOperations.multiPointDisjointEnvelope_ | train | private static boolean multiPointDisjointEnvelope_(MultiPoint multipoint_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (envelopeInfCont... | java | {
"resource": ""
} |
q154736 | RelationalOperations.multiPointWithinEnvelope_ | train | private static boolean multiPointWithinEnvelope_(MultiPoint multipoint_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (!envelopeInfConta... | java | {
"resource": ""
} |
q154737 | RelationalOperations.multiPointContainsEnvelope_ | train | private static boolean multiPointContainsEnvelope_(MultiPoint multipoint_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (!envelopeInfCon... | java | {
"resource": ""
} |
q154738 | RelationalOperations.pointEqualsPoint_ | train | private static boolean pointEqualsPoint_(Point2D pt_a, Point2D pt_b,
double tolerance, ProgressTracker progress_tracker) {
if (Point2D.sqrDistance(pt_a, pt_b) <= tolerance * tolerance)
return true;
return false;
} | java | {
"resource": ""
} |
q154739 | RelationalOperations.pointContainsPoint_ | train | private static boolean pointContainsPoint_(Point2D pt_a, Point2D pt_b,
double tolerance, ProgressTracker progress_tracker) {
return pointEqualsPoint_(pt_a, pt_b, tolerance, progress_tracker);
} | java | {
"resource": ""
} |
q154740 | RelationalOperations.pointEqualsEnvelope_ | train | private static boolean pointEqualsEnvelope_(Point2D pt_a, Envelope2D env_b,
double tolerance, ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D();
env_a.setCoords(pt_a);
return envelopeEqualsEnvelope_(env_a, env_b, tolerance,
progress_tracker);
} | java | {
"resource": ""
} |
q154741 | RelationalOperations.pointDisjointEnvelope_ | train | static boolean pointDisjointEnvelope_(Point2D pt_a, Envelope2D env_b,
double tolerance, ProgressTracker progress_tracker) {
Envelope2D env_b_inflated = new Envelope2D();
env_b_inflated.setCoords(env_b);
env_b_inflated.inflate(tolerance, tolerance);
return !env_b_inflated.contains(pt_a);
} | java | {
"resource": ""
} |
q154742 | RelationalOperations.pointTouchesEnvelope_ | train | private static boolean pointTouchesEnvelope_(Point2D pt_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance)
return false; // when treates as a point, points cannot touch points
Envelope2D env_b_inflated = new Envelope... | java | {
"resource": ""
} |
q154743 | RelationalOperations.pointContainsEnvelope_ | train | private static boolean pointContainsEnvelope_(Point2D pt_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
return pointEqualsEnvelope_(pt_a, env_b, tolerance, progress_tracker);
} | java | {
"resource": ""
} |
q154744 | RelationalOperations.envelopeEqualsEnvelope_ | train | private static boolean envelopeEqualsEnvelope_(Envelope2D env_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
return envelopeInfContainsEnvelope_(env_a, env_b, tolerance)
&& envelopeInfContainsEnvelope_(env_b, env_a, tolerance);
} | java | {
"resource": ""
} |
q154745 | RelationalOperations.envelopeDisjointEnvelope_ | train | static boolean envelopeDisjointEnvelope_(Envelope2D env_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
Envelope2D env_b_inflated = new Envelope2D();
env_b_inflated.setCoords(env_b);
env_b_inflated.inflate(tolerance, tolerance);
return !env_a.isIntersecting(env_b_inflated);
} | java | {
"resource": ""
} |
q154746 | RelationalOperations.envelopeContainsEnvelope_ | train | private static boolean envelopeContainsEnvelope_(Envelope2D env_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
if (!envelopeInfContainsEnvelope_(env_a, env_b, tolerance))
return false;
if (env_a.getHeight() <= tolerance && env_a.getWidth() <= tolerance) {
Point2D pt_a = env_a.g... | java | {
"resource": ""
} |
q154747 | RelationalOperations.envelopeCrossesEnvelope_ | train | private static boolean envelopeCrossesEnvelope_(Envelope2D env_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
if (envelopeInfContainsEnvelope_(env_a, env_b, tolerance)
|| envelopeInfContainsEnvelope_(env_b, env_a, tolerance))
return false;
if (env_a.getHeight() <= tolerance &&... | java | {
"resource": ""
} |
q154748 | RelationalOperations.envelopeInfContainsEnvelope_ | train | private static boolean envelopeInfContainsEnvelope_(Envelope2D env_a,
Envelope2D env_b, double tolerance) {
Envelope2D env_a_inflated = new Envelope2D();
env_a_inflated.setCoords(env_a);
env_a_inflated.inflate(tolerance, tolerance);
return env_a_inflated.contains(env_b);
} | java | {
"resource": ""
} |
q154749 | RelationalOperations.interiorEnvExteriorEnv_ | train | private static boolean interiorEnvExteriorEnv_(Envelope2D env_a,
Envelope2D env_b, double tolerance) {
Envelope2D envBInflated = new Envelope2D();
envBInflated.setCoords(env_b);
envBInflated.inflate(tolerance, tolerance);
Point2D pt = new Point2D();
env_a.queryLowerLeft(pt);
if (!envBInflated.contains(p... | java | {
"resource": ""
} |
q154750 | RelationalOperations.multiPathExactlyEqualsMultiPath_ | train | private static boolean multiPathExactlyEqualsMultiPath_(
MultiPath multipathA, MultiPath multipathB, double tolerance,
ProgressTracker progress_tracker) {
if (multipathA.getPathCount() != multipathB.getPathCount()
|| multipathA.getPointCount() != multipathB.getPointCount())
return false;
Point2D ptA =... | java | {
"resource": ""
} |
q154751 | RelationalOperations.multiPointExactlyEqualsMultiPoint_ | train | private static boolean multiPointExactlyEqualsMultiPoint_(
MultiPoint multipoint_a, MultiPoint multipoint_b, double tolerance,
ProgressTracker progress_tracker) {
if (multipoint_a.getPointCount() != multipoint_b.getPointCount())
return false;
Point2D ptA = new Point2D(), ptB = new Point2D();
boolean bAl... | java | {
"resource": ""
} |
q154752 | RelationalOperations.multiPointIntersectsMultiPoint_ | train | private static boolean multiPointIntersectsMultiPoint_(
MultiPoint _multipointA, MultiPoint _multipointB, double tolerance,
ProgressTracker progress_tracker) {
MultiPoint multipoint_a;
MultiPoint multipoint_b;
if (_multipointA.getPointCount() > _multipointB.getPointCount()) {
multipoint_a = _multipointB... | java | {
"resource": ""
} |
q154753 | RelationalOperations.linearPathEqualsLinearPath_ | train | private static boolean linearPathEqualsLinearPath_(MultiPath multipathA,
MultiPath multipathB, double tolerance, boolean bEnforceOrientation) {
return linearPathWithinLinearPath_(multipathA, multipathB, tolerance, bEnforceOrientation)
&& linearPathWithinLinearPath_(multipathB, multipathA,
tolerance, bEnf... | java | {
"resource": ""
} |
q154754 | RelationalOperations.linearPathIntersectsLinearPath_ | train | private static boolean linearPathIntersectsLinearPath_(
MultiPath multipathA, MultiPath multipathB, double tolerance) {
MultiPathImpl multi_path_impl_a = (MultiPathImpl) multipathA._getImpl();
MultiPathImpl multi_path_impl_b = (MultiPathImpl) multipathB._getImpl();
SegmentIteratorImpl segIterA = multi_path_im... | java | {
"resource": ""
} |
q154755 | RelationalOperations.linearPathIntersectsPoint_ | train | static boolean linearPathIntersectsPoint_(MultiPath multipathA,
Point2D ptB, double tolerance) {
Point2D closest = new Point2D();
double toleranceSq = tolerance * tolerance;
SegmentIteratorImpl segIterA = ((MultiPathImpl) multipathA._getImpl())
.querySegmentIterator();
GeometryAccelerators accel = ((Mul... | java | {
"resource": ""
} |
q154756 | RelationalOperations.linearPathIntersectsEnvelope_ | train | private static boolean linearPathIntersectsEnvelope_(MultiPath multipath_a,
Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
if (!multipath_a.hasNonLinearSegments()) {
Envelope2D env_b_inflated = new Envelope2D();
env_b_inflated.setCoords(env_b);
env_b_inflated.inflate(tolerance, to... | java | {
"resource": ""
} |
q154757 | RelationalOperations.checkVerticesForIntersection_ | train | private static boolean checkVerticesForIntersection_(
MultiVertexGeometryImpl geom, RasterizedGeometry2D rgeom) {
// Do a quick raster test for each point. If any point is inside, then
// there is an intersection.
int pointCount = geom.getPointCount();
Point2D pt = new Point2D();
for (int ipoint = 0; ipoin... | java | {
"resource": ""
} |
q154758 | BucketSort.reset | train | private boolean reset(int bucket_count, double min_value, double max_value,
int capacity) {
if (bucket_count < 2 || max_value == min_value)
return false;
int bc = Math.min(MAXBUCKETS, bucket_count);
m_buckets.reserve(bc);
m_buckets.resize(bc);
m_buckets.setRange(0, 0, m_buckets.size());
m_min_value =... | java | {
"resource": ""
} |
q154759 | BucketSort.getBucket | train | private int getBucket(double value) {
assert (value >= m_min_value && value <= m_max_value);
int bucket = (int) ((value - m_min_value) / m_dy);
return bucket;
} | java | {
"resource": ""
} |
q154760 | StridedIndexTypeCollection.getField | train | int getField(int element, int field) {
assert(m_buffer[element >> m_blockPower][(element & m_blockMask) + 1] != -0x7eadbeed);
return m_buffer[element >> m_blockPower][(element & m_blockMask)
+ field];
} | java | {
"resource": ""
} |
q154761 | StridedIndexTypeCollection.setField | train | void setField(int element, int field, int value) {
assert(m_buffer[element >> m_blockPower][(element & m_blockMask) + 1] != -0x7eadbeed);
m_buffer[element >> m_blockPower][(element & m_blockMask) + field] = value;
} | java | {
"resource": ""
} |
q154762 | StridedIndexTypeCollection.newElement | train | int newElement() {
int element = m_firstFree;
if (element == -1) {
if (m_last == m_capacity) {
long newcap = m_capacity != 0 ? (((long) m_capacity + 1) * 3 / 2)
: (long) 1;
if (newcap > Integer.MAX_VALUE)
newcap = Integer.MAX_VALUE;// cannot grow past 2gb elements
// presently
... | java | {
"resource": ""
} |
q154763 | StridedIndexTypeCollection.swapField | train | void swapField(int element1, int element2, int field) {
int ar1[] = m_buffer[element1 >> m_blockPower];
int ar2[] = m_buffer[element2 >> m_blockPower];
int ind1 = (element1 & m_blockMask) + field;
int ind2 = (element2 & m_blockMask) + field;
int tmp = ar1[ind1];
ar1[ind1] = ar2[ind2];
ar2[ind2] = tmp;
} | java | {
"resource": ""
} |
q154764 | MultiPoint.add | train | public void add(MultiVertexGeometry src, int srcFrom, int srcTo) {
m_impl.add((MultiVertexGeometryImpl) src._getImpl(), srcFrom, srcTo);
} | java | {
"resource": ""
} |
q154765 | Transformation2D.transform | train | public void transform(Point[] pointsIn, int count, Point[] pointsOut) {
Point2D res = new Point2D();
for (int i = 0; i < count; i++) {
Point2D p = pointsIn[i].getXY();
res.x = xx * p.x + xy * p.y + xd;
res.y = yx * p.x + yy * p.y + yd;
pointsOut[i] = new Point(res.x, res.y);
}
} | java | {
"resource": ""
} |
q154766 | Transformation2D.transform | train | public void transform(double[] pointsXYInterleaved, int start, int count) {
int n = Math.min(pointsXYInterleaved.length, (start + count) * 2) / 2;
for (int i = count; i < n; i++) {
double px = pointsXYInterleaved[2 * i];
double py = pointsXYInterleaved[2 * i + 1];
pointsXYInterleaved[2 * i] = xx * px + xy ... | java | {
"resource": ""
} |
q154767 | Transformation2D.copy | train | public Transformation2D copy() {
Transformation2D result = new Transformation2D();
result.xx = xx;
result.xy = xy;
result.xd = xd;
result.yx = yx;
result.yy = yy;
result.yd = yd;
return result;
} | java | {
"resource": ""
} |
q154768 | Transformation2D.getCoefficients | train | public void getCoefficients(double[] coefs) {
if (coefs.length < 6)
throw new GeometryException(
"Buffer is too small. coefs needs 6 members");
coefs[0] = xx;
coefs[1] = xy;
coefs[2] = xd;
coefs[3] = yx;
coefs[4] = yy;
coefs[5] = yd;
} | java | {
"resource": ""
} |
q154769 | Transformation2D.initializeFromRect | train | void initializeFromRect(Envelope2D src, Envelope2D dest) {
if (src.isEmpty() || dest.isEmpty() || 0 == src.getWidth()
|| 0 == src.getHeight())
setZero();
else {
xy = yx = 0;
xx = dest.getWidth() / src.getWidth();
yy = dest.getHeight() / src.getHeight();
xd = dest.xmin - src.xmin * xx;
yd = des... | java | {
"resource": ""
} |
q154770 | Transformation2D.initializeFromRectIsotropic | train | void initializeFromRectIsotropic(Envelope2D src, Envelope2D dest) {
if (src.isEmpty() || dest.isEmpty() || 0 == src.getWidth()
|| 0 == src.getHeight())
setZero();
else {
yx = 0;
xy = 0;
xx = dest.getWidth() / src.getWidth();
yy = dest.getHeight() / src.getHeight();
if (xx > yy)
xx = yy;
... | java | {
"resource": ""
} |
q154771 | Transformation2D.transformSize | train | Point2D transformSize(Point2D SizeSrc) {
Point2D pt = new Point2D();
pt.x = Math.sqrt(xx * xx + yx * yx) * SizeSrc.x;
pt.y = Math.sqrt(xy * xy + yy * yy) * SizeSrc.y;
return pt;
} | java | {
"resource": ""
} |
q154772 | Transformation2D.transform | train | public double transform(double tolerance) {
// the function should be implemented as follows: find encompassing
// circle for the transformed circle of radius = Tolerance.
// this is approximation.
Point2D pt1 = new Point2D();
Point2D pt2 = new Point2D();
/*
* pt[0].Set(0, 0); pt[1].Set(1, 0); pt[2].Set... | java | {
"resource": ""
} |
q154773 | Transformation2D.transformWithoutShift | train | void transformWithoutShift(Point2D[] pointsIn, int from, int count,
Point2D[] pointsOut) {
for (int i = from, n = from + count; i < n; i++) {
Point2D p = pointsIn[i];
double new_x = xx * p.x + xy * p.y;
double new_y = yx * p.x + yy * p.y;
pointsOut[i].setCoords(new_x, new_y);
}
} | java | {
"resource": ""
} |
q154774 | Transformation2D.isIdentity | train | public boolean isIdentity(double tol) {
Point2D pt = Point2D.construct(0., 1.);
transform(pt, pt);
pt.sub(Point2D.construct(0., 1.));
if (pt.sqrLength() > tol * tol)
return false;
pt.setCoords(0, 0);
transform(pt, pt);
if (pt.sqrLength() > tol * tol)
return false;
pt.setCoords(1.0, 0.0);
trans... | java | {
"resource": ""
} |
q154775 | Transformation2D.isUniform | train | public boolean isUniform(double eps) {
double v1 = xx * xx + yx * yx;
double v2 = xy * xy + yy * yy;
double e = (v1 + v2) * eps;
return Math.abs(v1 - v2) <= e && Math.abs(xx * xy + yx * yy) <= e;
} | java | {
"resource": ""
} |
q154776 | Transformation2D.isShift | train | public boolean isShift(double tol) {
Point2D pt = transformWithoutShift(Point2D.construct(0.0, 1.0));
pt.y -= 1.0;
if (pt.sqrLength() > tol * tol)
return false;
pt = transformWithoutShift(Point2D.construct(1.0, 0.0));
pt.x -= 1.0;
return pt.sqrLength() <= tol * tol;
} | java | {
"resource": ""
} |
q154777 | Transformation2D.isScaleAndShift | train | public boolean isScaleAndShift(double tol) {
return xy * xy + yx * yx < (xx * xx + yy * yy) * tol;
} | java | {
"resource": ""
} |
q154778 | Transformation2D.setShift | train | public void setShift(double x, double y) {
xx = 1;
xy = 0;
xd = x;
yx = 0;
yy = 1;
yd = y;
} | java | {
"resource": ""
} |
q154779 | Transformation2D.setFlipX | train | public void setFlipX(double x0, double x1) {
xx = -1;
xy = 0;
xd = x0 + x1;
yx = 0;
yy = 1;
yd = 0;
} | java | {
"resource": ""
} |
q154780 | Transformation2D.setFlipY | train | public void setFlipY(double y0, double y1) {
xx = 1;
xy = 0;
xd = 0;
yx = 0;
yy = -1;
yd = y0 + y1;
} | java | {
"resource": ""
} |
q154781 | Transformation2D.setShear | train | public void setShear(double proportionX, double proportionY) {
xx = 1;
xy = proportionX;
xd = 0;
yx = proportionY;
yy = 1;
yd = 0;
} | java | {
"resource": ""
} |
q154782 | Transformation2D.setRotate | train | public void setRotate(double cosA, double sinA) {
xx = cosA;
xy = -sinA;
xd = 0;
yx = sinA;
yy = cosA;
yd = 0;
} | java | {
"resource": ""
} |
q154783 | Transformation2D.scale | train | public void scale(double x, double y) {
xx *= x;
xy *= x;
xd *= x;
yx *= y;
yy *= y;
yd *= y;
} | java | {
"resource": ""
} |
q154784 | Transformation2D.flipX | train | public void flipX(double x0, double x1) {
xx = -xx;
xy = -xy;
xd = x0 + x1 - xd;
} | java | {
"resource": ""
} |
q154785 | Transformation2D.flipY | train | public void flipY(double y0, double y1) {
yx = -yx;
yy = -yy;
yd = y0 + y1 - yd;
} | java | {
"resource": ""
} |
q154786 | Transformation2D.shear | train | public void shear(double proportionX, double proportionY) {
Transformation2D temp = new Transformation2D();
temp.setShear(proportionX, proportionY);
multiply(temp);
} | java | {
"resource": ""
} |
q154787 | Transformation2D.rotate | train | public void rotate(double cos, double sin, Point2D rotationCenter) {
Transformation2D temp = new Transformation2D();
temp.setRotate(cos, sin, rotationCenter);
multiply(temp);
} | java | {
"resource": ""
} |
q154788 | Transformation2D.inverse | train | public void inverse(Transformation2D inverse) {
double det = xx * yy - xy * yx;
if (det == 0) {
inverse.setZero();
return;
}
det = 1 / det;
inverse.xd = (xy * yd - xd * yy) * det;
inverse.yd = (xd * yx - xx * yd) * det;
inverse.xx = yy * det;
inverse.xy = -xy * det;
inverse.yx = -yx * det;
... | java | {
"resource": ""
} |
q154789 | PointInPolygonHelper._isRingInRing2D | train | static boolean _isRingInRing2D(MultiPath polygon, int iRing1, int iRing2,
double tolerance, QuadTree quadTree) {
MultiPathImpl polygonImpl = (MultiPathImpl) polygon._getImpl();
SegmentIteratorImpl segIter = polygonImpl.querySegmentIterator();
segIter.resetToPath(iRing1);
if (!segIter.nextPath() || !segIter.h... | java | {
"resource": ""
} |
q154790 | MultiPath.add | train | public void add(MultiPath src, boolean bReversePaths) {
m_impl.add((MultiPathImpl) src._getImpl(), bReversePaths);
} | java | {
"resource": ""
} |
q154791 | MultiPath.addPath | train | public void addPath(MultiPath src, int srcPathIndex, boolean bForward) {
m_impl.addPath((MultiPathImpl) src._getImpl(), srcPathIndex, bForward);
} | java | {
"resource": ""
} |
q154792 | MultiPath.addPath | train | void addPath(Point2D[] points, int count, boolean bForward) {
m_impl.addPath(points, count, bForward);
} | java | {
"resource": ""
} |
q154793 | MultiPath.addSegmentsFromPath | train | public void addSegmentsFromPath(MultiPath src, int srcPathIndex,
int srcSegmentFrom, int srcSegmentCount, boolean bStartNewPath) {
m_impl.addSegmentsFromPath((MultiPathImpl) src._getImpl(),
srcPathIndex, srcSegmentFrom, srcSegmentCount, bStartNewPath);
} | java | {
"resource": ""
} |
q154794 | MultiPath.insertPath | train | public void insertPath(int pathIndex, MultiPath src, int srcPathIndex,
boolean bForward) {
m_impl.insertPath(pathIndex, (MultiPathImpl) src._getImpl(),
srcPathIndex, bForward);
} | java | {
"resource": ""
} |
q154795 | MultiPath.insertPath | train | void insertPath(int pathIndex, Point2D[] points, int pointsOffset,
int count, boolean bForward) {
m_impl.insertPath(pathIndex, points, pointsOffset, count, bForward);
} | java | {
"resource": ""
} |
q154796 | MultiPath.insertPoints | train | public void insertPoints(int pathIndex, int beforePointIndex,
MultiPath src, int srcPathIndex, int srcPointIndexFrom,
int srcPointCount, boolean bForward) {
m_impl.insertPoints(pathIndex, beforePointIndex,
(MultiPathImpl) src._getImpl(), srcPathIndex,
srcPointIndexFrom, srcPointCount, bForward);
} | java | {
"resource": ""
} |
q154797 | MultiPath.insertPoints | train | void insertPoints(int pathIndex, int beforePointIndex, Point2D[] src,
int srcPointIndexFrom, int srcPointCount, boolean bForward) {
m_impl.insertPoints(pathIndex, beforePointIndex, src,
srcPointIndexFrom, srcPointCount, bForward);
} | java | {
"resource": ""
} |
q154798 | MultiPath.bezierTo | train | void bezierTo(Point2D controlPoint1, Point2D controlPoint2, Point2D endPoint) {
m_impl.bezierTo(controlPoint1, controlPoint2, endPoint);
} | java | {
"resource": ""
} |
q154799 | VertexDescription.isDefaultValue | train | public static boolean isDefaultValue(int semantics, double v) {
return NumberUtils.doubleToInt64Bits(_defaultValues[semantics]) == NumberUtils
.doubleToInt64Bits(v);
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.