Package hampi.utils

Examples of hampi.utils.PigeonHoleDistributor


  }

  public void testDistro1() throws Exception{
    int pigeons = 20;
    int holes = 5;
    PigeonHoleDistributor phd = new PigeonHoleDistributor();
    Set<List<Integer>> distribute = phd.distribute(holes, pigeons, false);
    assertTrue(!distribute.isEmpty());
    for (List<Integer> list : distribute){
      assertEquals(pigeons, sum(list));
    }
  }
View Full Code Here

TOP

Related Classes of hampi.utils.PigeonHoleDistributor

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.