Am 06.10.19 um 21:18 schrieb Alvaro: > > Can I generate a random graph defining the input and output degrees of each > node? For example, tree nodes with respectively the input degrees (1, 2, 0) > and output degrees (1, 0, 2).
Yes. The degree sampler can take an optional parameter corresponding to the index of the vertex, which then you can use to return the specific degree: kin = [1, 2, 0] kout = [1, 0, 2] g = random_graph(3, lambda i: (kin[i], kout[i])) Best, Tiago -- Tiago de Paula Peixoto <ti...@skewed.de> _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool