private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }
private void trSort(final int isa, final int n, final int depth) { final int[] SA = this.SA; int first = 0, last; int t; if (-n < SA[0]) { TRBudget budget = new TRBudget(n, trLog(n) * 2 / 3 + 1); do { if ((t = SA[first]) < 0) { first -= t; } else { last = SA[isa + t] + 1; if (1 < last - first) { trIntroSort(isa, isa + depth, isa + n, first, last, budget, n); if (budget.chance == 0) { /* Switch to Larsson-Sadakane sorting algorithm */ if (0 < first) { SA[0] = -first; } lsSort(isa, n, depth); break; } } first = last; } } while (first < n); } }