An error occurred while loading the file. Please try again.
-
Lückemeyer authored2330d090
package de.hftstuttgart.dtabackend.models;
public class TestCompetencyProfile {
public static final int MAX_COMPETENCY_DIMENSIONS = 16;
public static final String COMPETENCY_SEPARATOR=";";
public String testPackageName;
public String testClassName;
public String testName;
public float[] competencyAssessments=new float[MAX_COMPETENCY_DIMENSIONS];
public static float[] competencyProjection(float[] cp, float[] cp2) {
float z[] = new float[MAX_COMPETENCY_DIMENSIONS];
for (int i = 0; i < MAX_COMPETENCY_DIMENSIONS; i++) {
z[i] = cp[i] * cp2[i];
}
return z;
}
public static float[] competencyShare(float[] cp, float[] cpTotal) {
float z[] = new float[MAX_COMPETENCY_DIMENSIONS];
for (int i = 0; i < MAX_COMPETENCY_DIMENSIONS; i++) {
z[i] = cp[i] / cpTotal[i];
}
return z;
}
public static float[] competencySum(float[] cp, float[] cp2) {
float z[] = new float[MAX_COMPETENCY_DIMENSIONS];
for (int i = 0; i < MAX_COMPETENCY_DIMENSIONS; i++) {
z[i] = cp[i] + cp2[i];
}
return z;
}
@Override
public boolean equals(Object other) {
return other instanceof TestCompetencyProfile &&
testPackageName.equals(((TestCompetencyProfile)other).testPackageName) &&
testClassName.equals(((TestCompetencyProfile)other).testClassName) &&
testName.equals(((TestCompetencyProfile)other).testName);
}
}