it.unimi.dsi.Util.randomSeed()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(186)

本文整理了Java中it.unimi.dsi.Util.randomSeed()方法的一些代码示例,展示了Util.randomSeed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.randomSeed()方法的具体详情如下:
包路径:it.unimi.dsi.Util
类名称:Util
方法名:randomSeed

Util.randomSeed介绍

[英]Returns a random seed generated by taking the output of a XoRoShiRo128PlusRandomGenerator(seeded at startup with System#nanoTime()) and xoring it with System#nanoTime().
[中]返回通过获取XoRoShiRo128PlusRandomGenerator(在启动时使用System#nanoTime()进行种子设定)的输出并使用System#nanoTime()进行xoring生成的随机种子。

代码示例

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Returns a random seed generated by {@link #randomSeed()} under the form of an array of eight bytes.
 *
 * @return a reasonably good random seed.
 */
public static byte[] randomSeedBytes() {
  final long seed = Util.randomSeed();
  final byte[] s = new byte[8];
  for(int i = Long.SIZE / Byte.SIZE; i-- != 0;) s[i] = (byte)(seed >>> i);
  return s;
}

代码示例来源:origin: it.unimi.dsi/webgraph

/** Creates an Erdős–Rényi graph with given parameters and random seed.
 *
 * @param n the number of nodes.
 * @param m the expected number of arcs.
 * @param loops whether loops are allowed or not.
 */
public ErdosRenyiGraph(final int n, final long m, final boolean loops) {
  this(n, m, Util.randomSeed(), loops);
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/**
 * Creates a new array of counters.
 *
 * @param arraySize the number of counters.
 * @param n the expected number of elements.
 * @param log2m the logarithm of the number of registers per counter (at most 30).
 */
public HyperLogLogCounterArray(final long arraySize, final long n, final int log2m) {
  this(arraySize, n, log2m, Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift1024StarPhiRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift128PlusRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoShiRo256PlusRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift1024StarRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public SplitMix64RandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/webgraph

/** Creates an Erdős–Rényi graph with given parameters.
 *
 * @param n the number of nodes.
 * @param p the probability of generating an arc.
 * @param loops whether loops are allowed or not.
 */
public ErdosRenyiGraph(final int n, final double p, final boolean loops) {
  this(n, p, Util.randomSeed(), loops);
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift1024StarRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoRoShiRo128StarStarRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift64StarRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoRoShiRo128StarStarRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoShiRo256StarStarRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoShiRo256StarStarRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoRoShiRo128PlusRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XorShift64StarRandomGenerator() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public XoRoShiRo128PlusRandom() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/dsiutils

/** Creates a new generator seeded using {@link Util#randomSeed()}. */
public SplitMix64Random() {
  this(Util.randomSeed());
}

代码示例来源:origin: it.unimi.dsi/webgraph

/** Generates an Erdős–Rényi graph.
 *
 * <p>This method exists only for backward compatibility.
 *
 * @return the generated graph.
 * @deprecated An instance of this class is already an {@link ImmutableSequentialGraph}.
 */
@Deprecated
public ImmutableGraph generate() {
  return generate(Util.randomSeed());
}

相关文章