
Public Member Functions | |
| bool | operator< (const BuildTreeRecord &btr) const |
Static Public Member Functions | |
| double | getDistance (const BuildTreeRecord &btr1, const BuildTreeRecord &btr2) |
Public Attributes | |
| int | parent |
| int | treeLocIndex |
| double | distance |
| double | yDistance |
| double | xStart |
| double | xEnd |
| double | yStart |
| double | yEnd |
| bool | used |
Static Public Attributes | |
| double | _epsilon = 0 |
|
||||||||||||
|
Definition at line 179 of file pltobtree.cxx. References _epsilon, xEnd, xStart, yEnd, and yStart.
00181 {
00182 double tempDistance = btr1.xStart - btr2.xEnd;// tempXlocStart - currXlocEnd;
00183
00184 if (btr1.yEnd < btr2.yStart + _epsilon || // only count if y-spans overlap
00185 btr2.yEnd < btr1.yStart + _epsilon)
00186 tempDistance = INFTY;
00187
00188 else if (tempDistance < -1*_epsilon) // horizontal overlap? not necessary
00189 {
00190 if (btr2.xStart < btr1.xEnd - _epsilon) // horizontal overlap
00191 {
00192 if ((btr1.yEnd > btr2.yStart + _epsilon) &&
00193 (btr1.yStart < btr2.yEnd - _epsilon))
00194 tempDistance = 0; // real overlap, push it horizontally
00195 else
00196 tempDistance = INFTY; // no overlap, treat it as no-edge
00197 }
00198 else
00199 tempDistance = INFTY;
00200 }
00201
00202 return max(tempDistance, 0.0);
00203 }
|
|
|
Definition at line 205 of file pltobtree.cxx. References _epsilon, distance, xEnd, xStart, yEnd, and yStart.
00206 {
00207 double difference = distance - btr.distance;
00208 if (fabs(difference) < _epsilon)
00209 {
00210 if (xEnd < btr.xStart + _epsilon) // break ties by x-span (L > R)
00211 return true;
00212 else if (btr.xEnd < xStart + _epsilon)
00213 return false;
00214
00215 if (yEnd < btr.yStart + _epsilon) // break ties by y-span (T > B)
00216 return true;
00217 else if (btr.yEnd < yStart + _epsilon)
00218 return false;
00219 else
00220 return false; // two blocks overlap, whatever
00221 }
00222 else
00223 return difference < 0;
00224 }
|
|
|
Definition at line 50 of file pltobtree.cxx. Referenced by getDistance(), and operator<(). |
|
|
Definition at line 83 of file pltobtree.h. Referenced by operator<(). |
|
|
Definition at line 81 of file pltobtree.h. Referenced by Pl2BTree::build_tree_add_block(), and Pl2BTree::ValidCriterion::operator()(). |
|
|
Definition at line 82 of file pltobtree.h. Referenced by Pl2BTree::build_tree_add_block(). |
|
|
Definition at line 90 of file pltobtree.h. Referenced by Pl2BTree::ValidCriterion::operator()(). |
|
|
Definition at line 87 of file pltobtree.h. Referenced by getDistance(), and operator<(). |
|
|
Definition at line 86 of file pltobtree.h. Referenced by getDistance(), and operator<(). |
|
|
Definition at line 84 of file pltobtree.h. |
|
|
Definition at line 89 of file pltobtree.h. Referenced by getDistance(), and operator<(). |
|
|
Definition at line 88 of file pltobtree.h. Referenced by getDistance(), and operator<(). |
1.3.2