@Test public void testBig() { RandomGraphs.randomFast(100000, 2000000); }
public static UGraph<String> randomFast(int n, int m) { UGraph<String> graph = new LightUGraph<String>(); for(int i : series(n)) graph.add("x"); long ln = (long)n; long total = (ln*ln - ln) / (long)2; List<Long> indices = Functions.sample(m, total); for(long index : indices) { Pair<Integer, Integer> ij = toPairUndirected(index, false); graph.get(ij.first()).connect(graph.get(ij.second())); } return graph; }
RandomGraphs { public static UGraph<String> randomFast(int n, int m) { UGraph<String> graph = new LightUGraph<String>(); for(int i : series(n)) graph.add("x"); long ln = (long)n; long total = (ln*ln - ln) / (long)2; List<Long> indices = Functions.sample(m, total); for(long index : indices) { Pair<Integer, Integer> ij = toPairUndirected(index, false); graph.get(ij.first()).connect(graph.get(ij.second())); } return graph; } }
RandomGraphs { public static UGraph<String> randomFast(int n, int m) { UGraph<String> graph = new LightUGraph<String>(); for(int i : series(n)) graph.add("x"); long ln = (long)n; long total = (ln*ln - ln) / (long)2; List<Long> indices = Functions.sample(m, total); for(long index : indices) { Pair<Integer, Integer> ij = toPairUndirected(index, false); graph.get(ij.first()).connect(graph.get(ij.second())); } return graph; }  }
RandomGraphs { public static UGraph<String> randomFast(int n, int m) { UGraph<String> graph = new LightUGraph<String>(); for(int i : series(n)) graph.add("x"); long ln = (long)n; long total = (ln*ln - ln) / (long)2; List<Long> indices = Functions.sample(m, total); for(long index : indices) { Pair<Integer, Integer> ij = toPairUndirected(index, false); graph.get(ij.first()).connect(graph.get(ij.second())); } return graph; }  static UTGraph<String, String> preferentialAttachment(int nodes, int toAttach); static DTGraph<String, String> preferentialAttachmentDirected(int nodes, int toAttach); static UTGraph<String, String> random(int n, double prob); static UTGraph<String, String> random(int n, int m); static UGraph<String> randomFast(int n, int m); static DGraph<String> randomDirectedFast(int n, int m); static DTGraph<String, String> randomDirected(int n, double prob); static UTGraph<String, String> fractal(
			int depth, int offspring, int interLinks, double hubProb); static Pair<Integer, Integer> toPairUndirected(long index, boolean self); }
RandomGraphs { public static UGraph<String> randomFast(int n, int m) { UGraph<String> graph = new LightUGraph<String>(); for(int i : series(n)) graph.add("x"); long ln = (long)n; long total = (ln*ln - ln) / (long)2; List<Long> indices = Functions.sample(m, total); for(long index : indices) { Pair<Integer, Integer> ij = toPairUndirected(index, false); graph.get(ij.first()).connect(graph.get(ij.second())); } return graph; }  static UTGraph<String, String> preferentialAttachment(int nodes, int toAttach); static DTGraph<String, String> preferentialAttachmentDirected(int nodes, int toAttach); static UTGraph<String, String> random(int n, double prob); static UTGraph<String, String> random(int n, int m); static UGraph<String> randomFast(int n, int m); static DGraph<String> randomDirectedFast(int n, int m); static DTGraph<String, String> randomDirected(int n, double prob); static UTGraph<String, String> fractal(
			int depth, int offspring, int interLinks, double hubProb); static Pair<Integer, Integer> toPairUndirected(long index, boolean self); static final int BA_INITIAL; }