Am 14.04.20 um 11:26 schrieb Tanguy Fardet:
>> But doesn't the function compute exactly what it says in the
>> documentation?
> 
> It does, but one needs to know what the undirected=True implies for the
> graph, otherwise the result is surprising (or just not what one's think
> one is computing, if not working on a super simple test graph where it
> is easy to check).

It is consistent with how directionality is implement in graph-tool,
which preserves the total number of edges. Furthermore, the concept of
multigraph vs simple graph is orthogonal to directed vs undirected graphs.

So this is not really about the clustering coefficient computation.

> I think some people might end up not noticing and therefore would not
> compute what they think they are computing...

I don't like second-guessing misinterpretations like this. What is
important is to be consistent.

The surprise came from not understanding how the undirected/directed
filter works. This kind of surprise will appear in almost every function
of this kind, and I don't think that putting a warning everywhere is the
right approach.

Besides, I think the way the undirected filter works is perfectly
intuitive. What you seemed to be expecting was for a simple directed
graph to become a simple undirected graph. But in this case how would
property maps be handled? Suppose the incoming edge had a weight value
and the outgoing edge had another, which one should be kept in the
simple graph? How would a directed multigraph be handled when converted
to undirected? Should it magically become a simple graph? Wouldn't that
be a lot more surprising?

In graph-tool all graphs are multigraphs per default, which makes
decisions such as these easier.

Best,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to