Package org.rlcommunity.rlglue.codec.taskspec.ranges

Examples of org.rlcommunity.rlglue.codec.taskspec.ranges.AbstractRange


        {
            char[] obsTypes = V3TaskSpec.getObsTypes();
            double[] obsMins = V3TaskSpec.getObsMins();
            double[] obsMaxs = V3TaskSpec.getObsMaxs();
            for (int i = 0; i < V3TaskSpec.getObsDim(); i++) {
                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') {
View Full Code Here

TOP

Related Classes of org.rlcommunity.rlglue.codec.taskspec.ranges.AbstractRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.