You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some methods in the cgraph package that doesn't have documentations. Their names and parameters don't necessarily make the functioning of those entities obvious, for example the method func (g *Graph) Degree(n *Node, in, out int) int, I don't know what the in and out parameters means, for me the degree of a vertex, is simply the number of edges connected to it, so it should just have the n parameter. I have to look at the source code, find the C function underline agdegree and look at the documentation of graphViz C implementation to figure out what that function does and the role of those parameters.
The function agdegree(g, n, in, out) gives the degree of a node in (sub)graph g, where in and
out select the edge sets.
• agdegree(g,n,TRUE,FALSE) returns the in-degree.
• agdegree(g,n,FALSE,TRUE) returns the out-degree.
• agdegree(g,n,TRUE,TRUE) returns their sum.
And some confusion remains because it seems like the parameters in and out should be boolean, at least in the Go implementation.
So I think that more documentation would be beneficial.
The text was updated successfully, but these errors were encountered:
While I certainly agree that the documentation on the Go bindings could be improved, the example above just feels like a case of a missed opportunity to expose a higher-level API. For instance, cgraph should likely expose functions called Indegree(), Outdegree(), and TotalDegree(). Perhaps I'll make a PR for that as well...
There are some methods in the
cgraph
package that doesn't have documentations. Their names and parameters don't necessarily make the functioning of those entities obvious, for example the methodfunc (g *Graph) Degree(n *Node, in, out int) int
, I don't know what thein
andout
parameters means, for me the degree of a vertex, is simply the number of edges connected to it, so it should just have then
parameter. I have to look at the source code, find theC
function underlineagdegree
and look at the documentation ofgraphViz C
implementation to figure out what that function does and the role of those parameters.And some confusion remains because it seems like the parameters
in
andout
should be boolean, at least in theGo
implementation.So I think that more documentation would be beneficial.
The text was updated successfully, but these errors were encountered: