Package org.jamesii.core.math.random.generators

Examples of org.jamesii.core.math.random.generators.IRandom.nextInt()


          break;
        }

        // ok, we have possible partners, lets make an edge
        // pick one randomly
        int partnerIndex = rnd.nextInt(possibleNeighbourIndices.size());
        graph.addEdge(new AnnotatedEdge<>(nodeList.get(i), nodeList
            .get(possibleNeighbourIndices.get(partnerIndex)), elDistri
            .getRandomNumber()));

        // update degrees
View Full Code Here


   */
  @Override
  public void setRandomValue() {

    IRandom r1 = SimSystem.getRNGGenerator().getNextRNG();
    int rand1 = r1.nextInt(getCategories().size());

    setValue(getCategory(rand1));
  }
}
View Full Code Here

    }
    if (getLowerBound() == null) {
      setLowerBound(Integer.MIN_VALUE / 2);
    }

    rand1 = r1.nextInt(getUpperBound() - getLowerBound() + increment);

    rand1 += getLowerBound();

    setValue(rand1);
  }
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.