| @@ 426-439 (lines=14) @@ | ||
| 423 | } |
|
| 424 | ||
| 425 | // If both structures are equal compare lengths of NPCG |
|
| 426 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| 427 | // If current CG is NPCG |
|
| 428 | if ($initial[$i][0] === 1) { |
|
| 429 | if ($initial[$i][1] > $compared[$i][1]) { |
|
| 430 | return 1; |
|
| 431 | } |
|
| 432 | ||
| 433 | if ($initial[$i][1] < $compared[$i][1]) { |
|
| 434 | return -1; |
|
| 435 | } |
|
| 436 | } |
|
| 437 | ||
| 438 | // Current NPCG character groups have equal length - continue |
|
| 439 | } |
|
| 440 | ||
| 441 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
| 442 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| @@ 442-455 (lines=14) @@ | ||
| 439 | } |
|
| 440 | ||
| 441 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
| 442 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| 443 | // If current CG is PCG |
|
| 444 | if ($initial[$i][0] === 0) { |
|
| 445 | if ($initial[$i][1] > $compared[$i][1]) { |
|
| 446 | return -1; |
|
| 447 | } |
|
| 448 | ||
| 449 | if ($initial[$i][1] < $compared[$i][1]) { |
|
| 450 | return 1; |
|
| 451 | } |
|
| 452 | } |
|
| 453 | ||
| 454 | // Current PCG character groups have equal length - continue |
|
| 455 | } |
|
| 456 | ||
| 457 | // Structures are absolutely equal |
|
| 458 | return 0; |
|