Overlap* Depot::load_overlap(uint32_t index, const ReadSet& reads) { OverlapSet temp; load_overlaps(temp, index, 1, reads); return temp.front(); }
void Depot::load_overlaps(OverlapSet& dst, const ReadSet& reads) { load_overlaps(dst, 0, -1, reads); // read all }
void find_overlaps(storm_file_handle_t *s_handle, si32 nstorms1, si32 nstorms2, storm_status_t *storms1, storm_status_t *storms2, double d_hours) { int istorm, jstorm; int overlap_in_x, overlap_in_y; int bounds_overlap; storm_status_t *storm1; storm_status_t *storm2; bounding_box_t *box2; bounding_box_t *box1; for (istorm = 0; istorm < nstorms1; istorm++) { storm1 = storms1 + istorm; for (jstorm = 0; jstorm < nstorms2; jstorm++) { storm2 = storms2 + jstorm; /* * check for overlap of bounding boxes */ box1 = &storm1->box_for_overlap; box2 = &storm2->box_for_overlap; if (box1->min_ix <= box2->max_ix && box1->max_ix >= box2->min_ix) { overlap_in_x = TRUE; } else { overlap_in_x = FALSE; } if (box1->min_iy <= box2->max_iy && box1->max_iy >= box2->min_iy) { overlap_in_y = TRUE; } else { overlap_in_y = FALSE; } if (overlap_in_x && overlap_in_y) { bounds_overlap = TRUE; } else { bounds_overlap = FALSE; } if (bounds_overlap) { if (Glob->params.debug >= DEBUG_VERBOSE) { fprintf(stderr, "bounding_boxes - time1:storm %d " "overlaps with time2:storm %d\n", istorm, jstorm); fprintf(stderr, "Storm 1 centroid, area: %g, %g, %g\n", storm1->current.proj_area_centroid_x, storm1->current.proj_area_centroid_y, storm1->current.proj_area); fprintf(stderr, "Storm 2 centroid, area: %g, %g, %g\n", storm2->current.proj_area_centroid_x, storm2->current.proj_area_centroid_y, storm2->current.proj_area); fprintf(stderr, "Storm 1: box_min_ix, box_min_iy, box_max_ix, " "box_max_iy: %ld, %ld, %ld, %ld\n", (long) box1->min_ix, (long) box1->min_iy, (long) box1->max_ix, (long) box1->max_iy); fprintf(stderr, "Storm 2: box_min_ix, box_min_iy, box_max_ix, " "box_max_iy: %ld, %ld, %ld, %ld\n", (long) box2->min_ix, (long) box2->min_iy, (long) box2->max_ix, (long) box2->max_iy); fprintf(stderr, "forecast_x, forecast_y: %g, %g\n", storm1->track->forecast_x, storm1->track->forecast_y); fprintf(stderr, "forecast_area, length_ratio: %g, %g\n", storm1->track->forecast_area, storm1->track->forecast_length_ratio); } /* if (Glob->params.debug >= DEBUG_VERBOSE) */ load_overlaps(s_handle, storms1, storms2, istorm, jstorm, box1, box2); } /* if (bounds_overlap) */ } /* jstorm */ } /* istorm */ return; }