Examples of max()


Examples of com.pholser.junit.quickcheck.generator.InRange.max()

    }

    @Override protected Map<Class<? extends Annotation>, Annotation> configurations() {
        InRange range = mock(InRange.class);
        when(range.min()).thenReturn("1/1/500");
        when(range.max()).thenReturn("12/31/2020");
        when(range.format()).thenReturn("MM/dd/yyyy");
        return Collections.<Class<? extends Annotation>, Annotation> singletonMap(InRange.class, range);
    }

    @Override public void verifyInteractionWithRandomness() {
View Full Code Here

Examples of com.pogofish.jadt.samples.whathow.GenericBinaryTreeUsage.max()

    @Test
    public void testMax() {
        GenericBinaryTreeUsage usage = new GenericBinaryTreeUsage();
        BinaryTree<String> empty = _EmptyTree();
       
        assertEquals(null, usage.max(empty));
       
        assertEquals("whatever", usage.max(_Node("hello", _Node("goodbye", empty, empty), _Node("whatever", empty, _Node("foo", empty, empty)))));
    }
   
    @Test
View Full Code Here

Examples of com.pogofish.jadt.samples.whathow.IntBinaryTreeUsage.max()

    }
   
    @Test
    public void testMax() {
        final IntBinaryTreeUsage usage = new IntBinaryTreeUsage();
        assertEquals(null, usage.max(_EmptyTree()));
        assertEquals(Integer.valueOf(110), usage.max(_Node(42, _Node(12, _EmptyTree(), _EmptyTree()), _Node(103, _EmptyTree(), _Node(110, _EmptyTree(), _EmptyTree())))));
    }

}
View Full Code Here

Examples of com.sk89q.intake.Command.max()

        if (annotation != null) {
            if (context.argsLength() < annotation.min()) {
                throw new MissingParameterException();
            }
   
            if (annotation.max() != -1 && context.argsLength() > annotation.max()) {
                throw new UnconsumedParameterException(context.getRemainingString(annotation.max()));
            }
        }

        return true;
View Full Code Here

Examples of com.sk89q.intake.parametric.annotation.Range.max()

                if (number < range.min()) {
                    throw new ParameterException(
                            String.format(
                                    "A valid value is greater than or equal to %s " +
                                    "(you entered %s)", range.min(), number));
                } else if (number > range.max()) {
                    throw new ParameterException(
                            String.format(
                                    "A valid value is less than or equal to %s " +
                                    "(you entered %s)", range.max(), number));
                }
View Full Code Here

Examples of com.sk89q.minecraft.util.commands.Command.max()

        if (annotation != null) {
            if (context.argsLength() < annotation.min()) {
                throw new MissingParameterException();
            }
   
            if (annotation.max() != -1 && context.argsLength() > annotation.max()) {
                throw new UnconsumedParameterException(
                        context.getRemainingString(annotation.max()));
            }
        }
    }
View Full Code Here

Examples of com.volantis.testtools.mock.method.Occurrences.max()

        occurrences.unbounded();
    }

    public void max(int maximum) {
        Occurrences occurrences = getOccurences();
        occurrences.max(maximum);
    }
}

/*
===========================================================================
View Full Code Here

Examples of de.jungblut.math.DoubleVector.max()

   *         is happening.
   */
  public double getProbabilityForSequence(int[] stateSequence) {
    DoubleVector distribution = getTransitionProbabilities(stateSequence);
    // normalize it by the maximum of the log probabilities
    double max = distribution.max();
    double probabilitySum = 0.0d;
    for (int i = 0; i < distribution.getDimension(); i++) {
      double probability = distribution.get(i);
      double normalizedProbability = probability - max;
      // add up the log probabilities
View Full Code Here

Examples of de.jungblut.math.dense.DenseDoubleVector.max()

    for (int i = 0; i < numClasses; i++) {
      double probability = getProbabilityForClass(document, i);
      distribution.set(i, probability);
    }

    double maxProbability = distribution.max();
    double probabilitySum = 0.0d;
    // we normalize it back
    for (int i = 0; i < numClasses; i++) {
      double probability = distribution.get(i);
      double normalizedProbability = FastMath.exp(probability - maxProbability
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4compiler.translator.A4Solution.max()

         sig2type.put(Sig.UNIV, AlloyType.UNIV);
         sig2type.put(Sig.SIGINT, AlloyType.INT);
         sig2type.put(Sig.SEQIDX, AlloyType.SEQINT);
         sig2type.put(Sig.STRING, AlloyType.STRING);
         ts.put(AlloyType.SEQINT, AlloyType.INT);
         for(int i=sol.min(), max=sol.max(), maxseq=sol.getMaxSeq(); i<=max; i++) {
            AlloyAtom at = new AlloyAtom(i>=0 && i<maxseq ? AlloyType.SEQINT : AlloyType.INT, i, ""+i);
            atom2sets.put(at, new LinkedHashSet<AlloySet>());
            string2atom.put(""+i, at);
         }
         for(Sig s:sol.getAllReachableSigs()) if (!s.builtin && s instanceof PrimSig) sig((PrimSig)s);
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.