116 lines
3.3 KiB
Java
116 lines
3.3 KiB
Java
package o;
|
|
|
|
import java.lang.reflect.Array;
|
|
import java.text.DecimalFormat;
|
|
import java.util.Arrays;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class pqt {
|
|
private int b;
|
|
public ktU d;
|
|
public String e;
|
|
private int[] c = new int[10];
|
|
private float[] a = new float[10];
|
|
|
|
public String toString() {
|
|
String str = this.e;
|
|
DecimalFormat decimalFormat = new DecimalFormat("##.##");
|
|
for (int i = 0; i < this.b; i++) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(str);
|
|
sb.append("[");
|
|
sb.append(this.c[i]);
|
|
sb.append(" , ");
|
|
sb.append(decimalFormat.format(this.a[i]));
|
|
sb.append("] ");
|
|
str = sb.toString();
|
|
}
|
|
return str;
|
|
}
|
|
|
|
public void c(int i, float f) {
|
|
int[] iArr = this.c;
|
|
if (iArr.length < this.b + 1) {
|
|
this.c = Arrays.copyOf(iArr, iArr.length << 1);
|
|
float[] fArr = this.a;
|
|
this.a = Arrays.copyOf(fArr, fArr.length << 1);
|
|
}
|
|
int[] iArr2 = this.c;
|
|
int i2 = this.b;
|
|
iArr2[i2] = i;
|
|
this.a[i2] = f;
|
|
this.b = i2 + 1;
|
|
}
|
|
|
|
public void c(int i) {
|
|
int i2;
|
|
int i3 = this.b;
|
|
if (i3 == 0) {
|
|
return;
|
|
}
|
|
int[] iArr = this.c;
|
|
float[] fArr = this.a;
|
|
int[] iArr2 = new int[iArr.length + 10];
|
|
iArr2[0] = i3 - 1;
|
|
iArr2[1] = 0;
|
|
int i4 = 2;
|
|
while (i4 > 0) {
|
|
int i5 = i4 - 1;
|
|
int i6 = iArr2[i5];
|
|
int i7 = i4 - 2;
|
|
int i8 = iArr2[i7];
|
|
if (i6 < i8) {
|
|
int i9 = iArr[i8];
|
|
int i10 = i6;
|
|
int i11 = i10;
|
|
while (i10 < i8) {
|
|
int i12 = iArr[i10];
|
|
if (i12 <= i9) {
|
|
int i13 = iArr[i11];
|
|
iArr[i11] = i12;
|
|
iArr[i10] = i13;
|
|
float f = fArr[i11];
|
|
fArr[i11] = fArr[i10];
|
|
fArr[i10] = f;
|
|
i11++;
|
|
}
|
|
i10++;
|
|
}
|
|
int i14 = iArr[i11];
|
|
iArr[i11] = iArr[i8];
|
|
iArr[i8] = i14;
|
|
float f2 = fArr[i11];
|
|
fArr[i11] = fArr[i8];
|
|
fArr[i8] = f2;
|
|
iArr2[i7] = i11 - 1;
|
|
iArr2[i5] = i6;
|
|
iArr2[i4] = i8;
|
|
iArr2[i4 + 1] = i11 + 1;
|
|
i4 += 2;
|
|
} else {
|
|
i4 = i7;
|
|
}
|
|
}
|
|
int i15 = 1;
|
|
for (int i16 = 1; i16 < this.b; i16++) {
|
|
int[] iArr3 = this.c;
|
|
if (iArr3[i16 - 1] != iArr3[i16]) {
|
|
i15++;
|
|
}
|
|
}
|
|
double[] dArr = new double[i15];
|
|
double[][] dArr2 = (double[][]) Array.newInstance((Class<?>) Double.TYPE, i15, 1);
|
|
int i17 = 0;
|
|
for (0; i2 < this.b; i2 + 1) {
|
|
if (i2 > 0) {
|
|
int[] iArr4 = this.c;
|
|
i2 = iArr4[i2] == iArr4[i2 - 1] ? i2 + 1 : 0;
|
|
}
|
|
dArr[i17] = this.c[i2] * 0.01d;
|
|
dArr2[i17][0] = this.a[i2];
|
|
i17++;
|
|
}
|
|
this.d = ktU.b(i, dArr, dArr2);
|
|
}
|
|
}
|