double scaleLowerBound = getScaleLowerBound();
double scaleUpperBound = getScaleUpperBound();
// get Transformer thresholds
NumericTransformer nt = (NumericTransformer) transformer;
// calculate output bounds
// increasing thresholds
if (nt.getThreshold1() <= nt.getThreshold5()) {
// lower bound
if (scaleLowerBound < nt.getThreshold1()) {
outputLowerBound = 0;
} else if (scaleLowerBound < nt.getThreshold2()) {
outputLowerBound = 1;
} else if (scaleLowerBound < nt.getThreshold3()) {
outputLowerBound = 2;
} else if (scaleLowerBound < nt.getThreshold4()) {
outputLowerBound = 3;
} else if (scaleLowerBound < nt.getThreshold5()) {
outputLowerBound = 4;
} else {
outputLowerBound = 5;
}
}
// decreasing thresholds
if (nt.getThreshold1() > nt.getThreshold5()) {
// lower bound
if (scaleUpperBound > nt.getThreshold1()) {
outputLowerBound = 0;
} else if (scaleUpperBound > nt.getThreshold2()) {
outputLowerBound = 1;
} else if (scaleUpperBound > nt.getThreshold3()) {
outputLowerBound = 2;
} else if (scaleUpperBound > nt.getThreshold4()) {
outputLowerBound = 3;
} else if (scaleUpperBound > nt.getThreshold5()) {
outputLowerBound = 4;
} else {
outputLowerBound = 5;
}
}