AbstractRange newRange = null;
if (obsTypes[i] == 'i') {
newRange = new IntRange((int) obsMins[i], (int) obsMaxs[i]);
}
if (obsTypes[i] == 'f') {
newRange = new DoubleRange(obsMins[i], obsMaxs[i]);
}
if (V3TaskSpec.isObsMinNegInfinity(i)) {
newRange.setMinNegInf();
}
if (V3TaskSpec.isObsMinUnknown(i)) {
newRange.setMinUnspecified();
}
if (V3TaskSpec.isObsMaxPosInfinity(i)) {
newRange.setMaxInf();
}
if (V3TaskSpec.isObsMaxUnknown(i)) {
newRange.setMaxUnspecified();
}
if (obsTypes[i] == 'i') {
intObservations.add((IntRange) newRange);
}
if (obsTypes[i] == 'f') {
doubleObservations.add((DoubleRange) newRange);
}
}
}
{
char[] actTypes = V3TaskSpec.getActionTypes();
double[] actMins = V3TaskSpec.getActionMins();
double[] actMaxs = V3TaskSpec.getActionMaxs();
for (int i = 0; i < V3TaskSpec.getActionDim(); i++) {
AbstractRange newRange = null;
if (actTypes[i] == 'i') {
newRange = new IntRange((int) actMins[i], (int) actMaxs[i]);
}
if (actTypes[i] == 'f') {
newRange = new DoubleRange(actMins[i], actMaxs[i]);
}
if (V3TaskSpec.isActionMinNegInfinity(i)) {
newRange.setMinNegInf();
}
if (V3TaskSpec.isActionMinUnknown(i)) {
newRange.setMinUnspecified();
}
if (V3TaskSpec.isActionMaxPosInfinity(i)) {
newRange.setMaxInf();
}
if (V3TaskSpec.isActionMaxUnknown(i)) {
newRange.setMaxUnspecified();
}
if (actTypes[i] == 'i') {
intActions.add((IntRange) newRange);
}
if (actTypes[i] == 'f') {
doubleActions.add((DoubleRange) newRange);
}
}
}
rewardRange = new DoubleRange(V3TaskSpec.getRewardMin(), V3TaskSpec.getRewardMax());
if (V3TaskSpec.isMinRewardNegInf()) {
rewardRange.setMinNegInf();
}
if (V3TaskSpec.isMinRewardUnknown()) {
rewardRange.setMinUnspecified();