2019-08-09 10:08:34 +02:00
|
|
|
package eu.dnetlib.pace.tree.support;
|
|
|
|
|
|
|
|
import eu.dnetlib.pace.util.PaceException;
|
|
|
|
|
|
|
|
public enum AggType {
|
|
|
|
|
2019-11-07 12:47:12 +01:00
|
|
|
W_MEAN, //weighted mean
|
|
|
|
AVG, //average
|
2019-08-09 10:08:34 +02:00
|
|
|
SUM,
|
|
|
|
MAX,
|
2019-11-07 12:47:12 +01:00
|
|
|
MIN,
|
|
|
|
NC, //necessary condition
|
|
|
|
SC, //sufficient condition
|
|
|
|
AND,
|
|
|
|
OR;
|
2019-08-09 10:08:34 +02:00
|
|
|
|
|
|
|
public static AggType getEnum(String value) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
return AggType.valueOf(value);
|
|
|
|
}
|
|
|
|
catch (IllegalArgumentException e) {
|
|
|
|
throw new PaceException("Undefined aggregation type", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|