PartitionResult() — netty Function Reference
Architecture documentation for the PartitionResult() function in Bzip2DivSufSort.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a0662405_da20_82a9_4225_0fd911829cfa["PartitionResult()"] 5a60cb70_bf06_95bf_9c73_ed3a4dc24eba["Bzip2DivSufSort"] a0662405_da20_82a9_4225_0fd911829cfa -->|defined in| 5a60cb70_bf06_95bf_9c73_ed3a4dc24eba b2fe1e71_551d_eac4_bd6f_d7cf49bdf950["PartitionResult()"] b2fe1e71_551d_eac4_bd6f_d7cf49bdf950 -->|calls| a0662405_da20_82a9_4225_0fd911829cfa f0480673_1fb7_0aeb_3cd1_591ddf267014["trGetC()"] a0662405_da20_82a9_4225_0fd911829cfa -->|calls| f0480673_1fb7_0aeb_3cd1_591ddf267014 6cd08680_5bba_3632_1ac7_b77001ad18fa["swapElements()"] a0662405_da20_82a9_4225_0fd911829cfa -->|calls| 6cd08680_5bba_3632_1ac7_b77001ad18fa b2fe1e71_551d_eac4_bd6f_d7cf49bdf950["PartitionResult()"] a0662405_da20_82a9_4225_0fd911829cfa -->|calls| b2fe1e71_551d_eac4_bd6f_d7cf49bdf950 style a0662405_da20_82a9_4225_0fd911829cfa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java lines 1354–1421
private PartitionResult trPartition(final int isa, final int isaD, final int isaN,
int first, int last, final int v) {
final int[] SA = this.SA;
int a, b, c, d, e, f;
int t, s;
int x = 0;
b = first;
while (b < last && (x = trGetC(isa, isaD, isaN, SA[b])) == v) {
++b;
}
if ((a = b) < last && x < v) {
while (++b < last && (x = trGetC(isa, isaD, isaN, SA[b])) <= v) {
if (x == v) {
swapElements(SA, b, SA, a);
++a;
}
}
}
c = last - 1;
while (b < c && (x = trGetC(isa, isaD, isaN, SA[c])) == v) {
--c;
}
if (b < (d = c) && x > v) {
while (b < --c && (x = trGetC(isa, isaD, isaN, SA[c])) >= v) {
if (x == v) {
swapElements(SA, c, SA, d);
--d;
}
}
}
while (b < c) {
swapElements(SA, b, SA, c);
while (++b < c && (x = trGetC(isa, isaD, isaN, SA[b])) <= v) {
if (x == v) {
swapElements(SA, b, SA, a);
++a;
}
}
while (b < --c && (x = trGetC(isa, isaD, isaN, SA[c])) >= v) {
if (x == v) {
swapElements(SA, c, SA, d);
--d;
}
}
}
if (a <= d) {
c = b - 1;
if ((s = a - first) > (t = b - a)) {
s = t;
}
for (e = first, f = b - s; 0 < s; --s, ++e, ++f) {
swapElements(SA, e, SA, f);
}
if ((s = d - c) > (t = last - d - 1)) {
s = t;
}
for (e = b, f = last - s; 0 < s; --s, ++e, ++f) {
swapElements(SA, e, SA, f);
}
first += b - a;
last -= d - c;
}
return new PartitionResult(first, last);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does PartitionResult() do?
PartitionResult() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java.
Where is PartitionResult() defined?
PartitionResult() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java at line 1354.
What does PartitionResult() call?
PartitionResult() calls 3 function(s): PartitionResult, swapElements, trGetC.
What calls PartitionResult()?
PartitionResult() is called by 1 function(s): PartitionResult.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free