Codota Logo
MersenneTwister.<init>
Code IndexAdd Codota to your IDE (free)

How to use
smile.math.random.MersenneTwister
constructor

Best Java code snippets using smile.math.random.MersenneTwister.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: com.github.haifengl/smile-math

/**
 * Initialize with default random number generator engine.
 */
public Random() {
  real = new UniversalGenerator();
  twister = new MersenneTwister();
}
origin: com.github.haifengl/smile-math

/**
 * Initialize with given seed for default random number generator engine.
 */
public Random(long seed) {
  real = new UniversalGenerator(seed);
  twister = new MersenneTwister(seed);
}
origin: org.apache.hivemall/hivemall-core

@Nonnull
public static PRNG createPRNG(@Nonnull PRNGType type) {
  final PRNG rng;
  switch (type) {
    case java:
      rng = new JavaRandom();
      break;
    case secure:
      rng = new JavaRandom(new SecureRandom());
      break;
    case smile:
      rng = new SmileRandom();
      break;
    case smileMT:
      rng = new SmileRandom(new smile.math.random.MersenneTwister());
      break;
    case smileMT64:
      rng = new SmileRandom(new smile.math.random.MersenneTwister64());
      break;
    case commonsMath3MT:
      rng = new CommonsMathRandom(new org.apache.commons.math3.random.MersenneTwister());
      break;
    default:
      throw new IllegalStateException("Unexpected type: " + type);
  }
  return rng;
}
origin: org.apache.hivemall/hivemall-core

@Nonnull
public static PRNG createPRNG(@Nonnull PRNGType type, long seed) {
  final PRNG rng;
  switch (type) {
    case java:
      rng = new JavaRandom(seed);
      break;
    case secure:
      rng = new JavaRandom(new SecureRandom(Primitives.toBytes(seed)));
      break;
    case smile:
      rng = new SmileRandom(seed);
      break;
    case smileMT:
      rng = new SmileRandom(
        new smile.math.random.MersenneTwister(Primitives.hashCode(seed)));
      break;
    case smileMT64:
      rng = new SmileRandom(new smile.math.random.MersenneTwister64(seed));
      break;
    case commonsMath3MT:
      rng = new CommonsMathRandom(
        new org.apache.commons.math3.random.MersenneTwister(seed));
      break;
    default:
      throw new IllegalStateException("Unexpected type: " + type);
  }
  return rng;
}
smile.math.randomMersenneTwister<init>

Javadoc

Constructor.

Popular methods of MersenneTwister

  • next
  • nextDouble
  • nextInt
  • nextLong
  • setSeed

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now