Yquetzal / tnetwork

BSD 2-Clause "Simplified" License
15 stars 6 forks source link

Directed graph #8

Open p-dre opened 11 months ago

p-dre commented 11 months ago

Is there anything against implement directed graphs? For example with the small change below

def two_columns2directed_edge(interactions,source="n1",target="n2"):
    to_return = interactions[interactions[source] != interactions[target]]
    to_return["e"] = to_return.apply(lambda row: tuple([ row[source], row[target]]), axis=1)
    return to_return
Yquetzal commented 11 months ago

Thank you for the feedback, what do you mean exactly by "implementing directed graphs"? Theoretically, indeed the library can easily be extended to deal with directed graphs. However for now I implemented it only for undirected ones, and I don't have short term plans to extend it to directed by lack of time. But improvements welcomed :)

p-dre commented 11 months ago

Thank you for the answer. For my research I would need to use a weighted and direct graph. if I decide to customize your package I will contact you.