gnu.trove.list.TIntList.shuffle()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(115)

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

TIntList.shuffle介绍

[英]Shuffle the elements of the list using the specified random number generator.
[中]

代码示例

代码示例来源:origin: alibaba/mdrill

public void shuffle( Random rand ) {
  synchronized( mutex ) { list.shuffle( rand ); }
}

代码示例来源:origin: net.sf.trove4j/core

public void shuffle( Random rand ) {
  synchronized( mutex ) { list.shuffle( rand ); }
}

代码示例来源:origin: net.sf.trove4j/trove4j

public void shuffle( Random rand ) {
  synchronized( mutex ) { list.shuffle( rand ); }
}

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

@Override
public void shuffle( Random rand ) {
  synchronized( mutex ) { list.shuffle( rand ); }
}

代码示例来源:origin: hernad/easyrec

public void shuffle( Random rand ) {
  synchronized( mutex ) { list.shuffle( rand ); }
}

代码示例来源:origin: com.graphhopper/graphhopper

public static Graph shuffle( Graph g, Graph sortedGraph )
{
  int len = g.getNodes();
  TIntList list = new TIntArrayList(len, -1);
  list.fill(0, len, -1);
  for (int i = 0; i < len; i++)
  {
    list.set(i, i);
  }
  list.shuffle(new Random());
  return createSortedGraph(g, sortedGraph, list);
}

相关文章