Skip to content

Commit 29da086

Browse files
author
Alex Klymenko
committed
checkstyle: fix naming, from L to classificationArray for another method
1 parent 5b6e6c9 commit 29da086

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/com/thealgorithms/sorts/FlashSort.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,29 @@ private <T extends Comparable<? super T>> int findMaxIndex(final T[] arr) {
105105
}
106106

107107
/**
108-
* Classifies elements of the array into the classification array L.
108+
* Classifies elements of the array into the classification array classificationArray.
109109
*
110110
* @param arr the array to be classified.
111-
* @param L the classification array holding the count of elements in each class.
111+
* @param classificationArray the classification array holding the count of elements in each class.
112112
* @param c1 the normalization constant used to map the elements to the classification array.
113113
* @param min the minimum value in the array.
114114
* @param <T> the type of elements in the array, must be comparable.
115115
*/
116-
private <T extends Comparable<? super T>> void classify(final T[] arr, final int[] L, final double c1, final T min) {
116+
private <T extends Comparable<? super T>> void classify(final T[] arr, final int[] classificationArray, final double c1, final T min) {
117117
for (int i = 0; i < arr.length; i++) {
118118
int k = (int) (c1 * (arr[i].compareTo(min)));
119-
L[k]++;
119+
classificationArray[k]++;
120120
}
121121
}
122122

123123
/**
124-
* Transforms the classification array L into the starting index array.
124+
* Transforms the classification array classificationArray into the starting index array.
125125
*
126-
* @param L the classification array holding the count of elements in each class.
126+
* @param classificationArray the classification array holding the count of elements in each class.
127127
*/
128-
private void transform(final int[] L) {
129-
for (int i = 1; i < L.length; i++) {
130-
L[i] += L[i - 1];
128+
private void transform(final int[] classificationArray) {
129+
for (int i = 1; i < classificationArray.length; i++) {
130+
classificationArray[i] += classificationArray[i - 1];
131131
}
132132
}
133133

0 commit comments

Comments
 (0)