1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# -*- coding: utf-8 -*-
"""Stochastic Block Model Engine Profile."""
from pyrgg import *
import pyrgg.engines.stochastic_block_model as sbm_engine
import random
os.environ["PYRGG_TEST_MODE"] = "1"
random.seed(400)
sbm_engine.generate_graph(
generate_dimacs_file,
'profile',
{
'vertices': 10000,
'block_sizes': [1000, 800, 600, 400, 200, 1000, 1800, 1600, 1400, 1200],
'probability_matrix': [
[0.5, 0.1, 0.3, 0.2, 0.1, 0.05, 0.01, 0.1, 0.1, 0.01],
[0.1, 0.5, 0.1, 0.3, 0.2, 0.05, 0.01, 0.1, 0.1, 0.01],
[0.3, 0.1, 0.5, 0.1, 0.2, 0.05, 0.01, 0.1, 0.1, 0.01],
[0.2, 0.3, 0.1, 0.5, 0.1, 0.05, 0.01, 0.1, 0.1, 0.01],
[0.1, 0.2, 0.2, 0.1, 0.5, 0.05, 0.01, 0.1, 0.1, 0.01],
[0.05, 0.05, 0.05, 0.05, 0.05, 0.5, 0.01, 0.1, 0.1, 0.01],
[0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.5, 0.1, 0.1, 0.01],
[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.5, 0.1, 0.01],
[0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.5, 0.01],
[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.01, 0.01, 0.5],
],
'direct': 1,
'self_loop': 0,
}
)
|