Returns the proportion of b2 that is covered by b1.
Definition at line 674 of file gserialized_estimate.c.
References FALSE, ND_BOX_T::max, ND_BOX_T::min, and TRUE.
Referenced by compute_gserialized_stats_mode(), estimate_join_selectivity(), and estimate_selectivity().
682 for ( d = 0 ; d < ndims; d++ )
684 if ( b1->
max[d] <= b2->
min[d] || b1->
min[d] >= b2->
max[d] )
687 if ( b1->
min[d] > b2->
min[d] || b1->
max[d] < b2->
max[d] )
694 for ( d = 0; d < ndims; d++ )
696 double width1 = b1->
max[d] - b1->
min[d];
697 double width2 = b2->
max[d] - b2->
min[d];
698 double imin, imax, iwidth;
703 imin = Max(b1->
min[d], b2->
min[d]);
704 imax = Min(b1->
max[d], b2->
max[d]);
705 iwidth = imax - imin;
706 iwidth = Max(0.0, iwidth);