Examples of maxValue()


Examples of org.apache.mahout.math.Vector.maxValue()

  public void testAddToVector() {
    FeatureVectorEncoder enc = new ConstantValueEncoder("foo");
    Vector v1 = new DenseVector(20);
    enc.addToVector((byte[]) null, -123, v1);
    assertEquals(-123, v1.minValue(), 0);
    assertEquals(0, v1.maxValue(), 0);
    assertEquals(123, v1.norm(1), 0);

    v1 = new DenseVector(20);
    enc.addToVector((byte[]) null, 123, v1);
    assertEquals(123, v1.maxValue(), 0);
View Full Code Here

Examples of org.apache.mahout.math.Vector.maxValue()

    assertEquals(0, v1.maxValue(), 0);
    assertEquals(123, v1.norm(1), 0);

    v1 = new DenseVector(20);
    enc.addToVector((byte[]) null, 123, v1);
    assertEquals(123, v1.maxValue(), 0);
    assertEquals(0, v1.minValue(), 0);
    assertEquals(123, v1.norm(1), 0);

    Vector v2 = new DenseVector(20);
    enc.setProbes(2);
View Full Code Here

Examples of org.internna.iwebmvc.core.validation.annotation.DateConstraint.maxValue()

        Set<ValidationError> errors = new HashSet<ValidationError>();
        if (dateConstraint != null) {
            if (dateConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], dateConstraint, object));
            if (object != null) {
                Calendar min = dateConstraint.minValue().getDate(false);
                Calendar max = dateConstraint.maxValue().getDate(true);
                Calendar date = Calendar.getInstance();
                date.setTime((Date) object);
                if (date.before(min)) errors.add(new ValidationError(field.getName(), errorCodes[2], dateConstraint, object));
                if (date.after(max)) errors.add(new ValidationError(field.getName(), errorCodes[3], dateConstraint, object));
            }
View Full Code Here

Examples of org.internna.iwebmvc.core.validation.annotation.NumberConstraint.maxValue()

        if (numberConstraint != null) {
            if (numberConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], numberConstraint, object));
            if (object != null) {
                double numericValue = ((Number) object).doubleValue();
                if (numberConstraint.minValue() > numericValue) errors.add(new ValidationError(field.getName(), errorCodes[2], numberConstraint, object));
                if (numberConstraint.maxValue() < numericValue) errors.add(new ValidationError(field.getName(), errorCodes[3], numberConstraint, object));
            }
        }
        return errors;
    }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamByteValue.maxValue()

            LOG.error(errMsg);
            throw new IllegalArgumentException(errMsg, nfe);
          }
        } else {
          byte minValue = intStrategy.minValue();
          byte maxValue = intStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamCharValue.maxValue()

          retValue = charValue;

        } else {

          char minValue = annotationStrategy.minValue();
          char maxValue = annotationStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamDoubleValue.maxValue()

          }

        } else {

          double minValue = doubleStrategy.minValue();
          double maxValue = doubleStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamFloatValue.maxValue()

            throw new IllegalArgumentException(errMsg, nfe);
          }
        } else {

          float minValue = floatStrategy.minValue();
          float maxValue = floatStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamIntValue.maxValue()

          }

        } else {

          int minValue = intStrategy.minValue();
          int maxValue = intStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
View Full Code Here

Examples of uk.co.jemos.podam.common.PodamLongValue.maxValue()

            throw new IllegalArgumentException(errMsg, nfe);
          }
        } else {

          long minValue = longStrategy.minValue();
          long maxValue = longStrategy.maxValue();

          // Sanity check
          if (minValue > maxValue) {
            maxValue = minValue;
          }
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.