Examples of TargetValue


Examples of eu.scape_project.planning.model.values.TargetValue

     * @param v
     *            the ordinal value to be transformed
     * @return {@link TargetValue} transformed value.
     */
    public TargetValue transform(IOrdinalValue v) {
        TargetValue t = new TargetValue();
        TargetValueObject o = mapping.get(v.getValue());
        t.setValue(o.getValue());
        return t;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.values.TargetValue

     * @param d
     *            value to be transformed
     * @return transformed {@link TargetValue}
     */
    private TargetValue doTransform(double d) {
        TargetValue v = new TargetValue();
        switch (mode) {
            case THRESHOLD_STEPPING:
                v.setValue(thresholdstepping(d));
                break;
            case LINEAR:
                v.setValue(linear(d));
                break;
            default:
                LoggerFactory.getLogger(this.getClass()).error("TransformationMode is not set correctly.");
        }
        return v;
View Full Code Here

Examples of eu.scape_project.planning.model.values.TargetValue

    }

    @Test
    public void testWorstOneValue() {
        TargetValues values = new TargetValues();
        values.list().add(new TargetValue(1.0));
        assertEquals(1.0, values.worst(), EPSILON);
    }
View Full Code Here

Examples of eu.scape_project.planning.model.values.TargetValue

    }

    @Test
    public void testWorstAscendingValues() {
        TargetValues values = new TargetValues();
        values.getList().add(new TargetValue(1.5));
        values.getList().add(new TargetValue(2.0));
        values.getList().add(new TargetValue(5.0));

        assertEquals(1.5, values.worst(), EPSILON);
    }
View Full Code Here

Examples of eu.scape_project.planning.model.values.TargetValue

    }

    @Test
    public void testWorstDescendingValues() {
        TargetValues values = new TargetValues();
        values.getList().add(new TargetValue(5.0));
        values.getList().add(new TargetValue(2.0));
        values.getList().add(new TargetValue(1.5));

        assertEquals(1.5, values.worst(), EPSILON);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.