Dear Tiago,

I tried,
g, bm = gt.random_graph(
            1000,
            lambda: np.random.poisson(10),
            model="blockmodel-traditional",
            vertex_corr = corr,
            directed = False,
            block_membership=lambda: random.randint(1, 10)
)

where corr is,
    def corr(a, b):
        if a == b:
            return 1.
        else:
            return 0.

The edges are not forced to stay within the blocks, when I checked with,
gt.graph_draw(g, vertex_fill_color=bm, edge_color="black")

Am I missing something?

Thanks.


Best regards,
Tzu-Chi



--
View this message in context: 
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Meaning-of-vertex-corr-in-block-stochastic-tp4026563p4026741.html
Sent from the Main discussion list for the graph-tool project mailing list 
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to