Commit 4370da6
authored
attempt to fix some bugs of null pointers, 0 slopes, and 1 expansion factors (#29)
1. In function "expand_root" (alex.h), all pointers must be assigned to resolve issue #26 .
2. The case that the slope is equal to 0 must be carefully check to prevent emergence of infinite.
3. In function "significant_cost_deviation" and "catastrophic_cost" (alex_nodes.h), if the slope is equal to 0, keys of the data node are equal and should not be split. Otherwise, one key cannot be mapped to different data nodes.
4. In function "expand_root" (alex.h), the computation of expansion factor should be more precise for long long int, especially for "ceil" function, or expansion factor may be equal to 1.
Co-authored-by: Zhaoyan Sun <[email protected]>1 parent 7f4cc98 commit 4370da6
4 files changed
+63
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
1365 | | - | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1366 | 1371 | | |
1367 | | - | |
1368 | | - | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1369 | 1375 | | |
1370 | 1376 | | |
1371 | 1377 | | |
| |||
1382 | 1388 | | |
1383 | 1389 | | |
1384 | 1390 | | |
1385 | | - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1386 | 1397 | | |
1387 | | - | |
1388 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1389 | 1401 | | |
1390 | 1402 | | |
1391 | 1403 | | |
| |||
1483 | 1495 | | |
1484 | 1496 | | |
1485 | 1497 | | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1490 | 1502 | | |
1491 | 1503 | | |
1492 | 1504 | | |
| |||
1512 | 1524 | | |
1513 | 1525 | | |
1514 | 1526 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1519 | 1531 | | |
1520 | 1532 | | |
1521 | 1533 | | |
| |||
1585 | 1597 | | |
1586 | 1598 | | |
1587 | 1599 | | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1595 | 1613 | | |
1596 | 1614 | | |
1597 | 1615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | 365 | | |
370 | | - | |
371 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
| 1413 | + | |
| 1414 | + | |
1414 | 1415 | | |
1415 | 1416 | | |
1416 | 1417 | | |
| |||
1659 | 1660 | | |
1660 | 1661 | | |
1661 | 1662 | | |
1662 | | - | |
| 1663 | + | |
1663 | 1664 | | |
1664 | 1665 | | |
1665 | 1666 | | |
1666 | 1667 | | |
1667 | 1668 | | |
1668 | 1669 | | |
1669 | | - | |
| 1670 | + | |
1670 | 1671 | | |
1671 | 1672 | | |
1672 | 1673 | | |
| |||
0 commit comments