Examples of shuffle()


Examples of com.carrotsearch.randomizedtesting.annotations.ParametersFactory.shuffle()

      if (result.isEmpty()) {
        throw new InternalAssumptionViolatedException("Parameters set should not be empty. Ignoring tests.");
      }

      if (pfAnnotation.shuffle()) {
        Collections.shuffle(result, new Random(runnerRandomness.getSeed()));
      }

      parameters.addAll(result);
    }
View Full Code Here

Examples of com.svanloon.game.wizard.core.card.Deck.shuffle()

  private GameEventBroadcaster gameEventNotifier = new GameEventBroadcaster();
 
  private Card dealCards(int round, int dealer, int lead) {
    //Deck deck = new Deck(new PokerCardFinder());
    Deck deck = new Deck(cardFinder);
    deck.shuffle();
    for (int i = 0; i < round; i++) {
      for (Player player: new PlayerIterator(_playerCollection, lead)) {
        player.giveCard(deck.getCard());
      }
    }
View Full Code Here

Examples of game.Deck.shuffle()

     */
    public WarController()
    {
        Deck dk = Deck.getInstance();
        dk.reset();
        dk.shuffle();
        timer = WarTimer.getInstance();

        CheatingBehavior player1 = new NotCheating();
        CheatingBehavior player2 = new Cheating();
        playerCon = new PlayerController(player1, player2);
View Full Code Here

Examples of gnu.trove.list.TIntList.shuffle()

        TIntList list = new TIntArrayList( 20 );
        for ( int i = 0; i < element_count; i++ ) {
            list.add( i );
        }

        list.shuffle( new Random( System.currentTimeMillis() ) );
        for ( int i = 0; i < list.size(); i++ ) {
            assertTrue( list.contains( i ) );
        }
    }
View Full Code Here

Examples of gnu.trove.list.TIntList.shuffle()

        TIntList list = new TIntArrayList( 20 );
        for ( int i = 0; i < element_count; i++ ) {
            list.add( i );
        }

        list.shuffle( new Random( System.currentTimeMillis() ) );
        for ( int i = 0; i < list.size(); i++ ) {
            assertTrue( list.contains( i ) );
        }
    }
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.shuffle()

//        graph[i][start] = true;
        TIntArrayList nodes = new TIntArrayList(size);
        for (int i = 0; i < size; i++) {
            nodes.add(i);
        }
        nodes.shuffle(rand);
        for (int i = 0; i < size - 1; i++) {
            graph[nodes.get(i)][nodes.get(i + 1)] = true;
        }
        graph[nodes.get(size - 1)][nodes.get(0)] = true;
    }
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.shuffle()

    public static Domain buildSetDomain(int ds, Random r, double density, boolean homogeneou) {
        int[] env = buildFullDomains(1, 0, ds, r, density, homogeneou)[0];
        int nbK = r.nextInt(env.length);
        TIntArrayList l = new TIntArrayList(env);
        l.shuffle(r);
        int[] ker = new int[nbK];
        for (int i = 0; i < nbK; i++) {
            ker[i] = l.get(i);
        }
        return new Domain(env, ker);
View Full Code Here

Examples of net.sf.nebulacards.main.PileOfCards.shuffle()

   */
  public static void main(String[] args) {
    Frame parent = new Frame();
   
    PileOfCards deck = PileOfCards.getStandardDeck();
    deck.shuffle();
    PileOfCards hand = new PileOfCards(13);
    for (int i = 0; i < 13; i++)
      hand.add(deck.takeTop());
    PassWindow pw = new PassWindow(parent, hand, 3, "Bob");
    JOptionPane.showMessageDialog(null, "yo");
View Full Code Here

Examples of org.apache.mahout.cf.taste.impl.recommender.svd.ParallelSGDFactorizer.PreferenceShuffler.shuffle()

  @Test
  public void testPreferenceShufflerWithSyntheticData() throws Exception {
    setUpSyntheticData();

    ParallelSGDFactorizer.PreferenceShuffler shuffler = new PreferenceShuffler(dataModel);
    shuffler.shuffle();
    shuffler.stage();

    FastByIDMap<FastByIDMap<Boolean>> checked = new FastByIDMap<FastByIDMap<Boolean>>();

    for (int i = 0; i < shuffler.size(); i++) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.impl.recommender.svd.ParallelSGDFactorizer.PreferenceShuffler.shuffle()

  @Test
  public void testPreferenceShufflerWithSyntheticData() throws Exception {
    setUpSyntheticData();

    ParallelSGDFactorizer.PreferenceShuffler shuffler = new PreferenceShuffler(dataModel);
    shuffler.shuffle();
    shuffler.stage();

    FastByIDMap<FastByIDMap<Boolean>> checked = new FastByIDMap<FastByIDMap<Boolean>>();

    for (int i = 0; i < shuffler.size(); i++) {
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.