
While creating a rule writing the number of edges incident to a node to the node’s attributes, I noticed some peculiar behavior of Soley or probably the GrGen.net system.
When using the CountAdjacent and CountIncident functions documented in the GrGen.net manual, undirected edges are never counted. This is the case for the „pure“ Count function as well as the directed functions, e.g. CountAdjacentIncoming. Undirected edges are only counted when their class is specifically stated as an argument of the undirected function.
What is even more surprising, when the edge class is specified, undirected edges are counted in the directed functions according to the way they have been drawn. Put differently, undirected edges are counted as outgoing for the node that has first been clicked when drawing the edge. I thought this peculiarity may be of interest to you since it obviously can lead to misleading results.Given the description above, I would like to ask whether you knew of a way to count undirected edges incident to a node without manually specifying all edge classes. I would appreciate it if you could provide me with a hint on how to implement this functionality.
Hi,
this is definitely a GrGen bug and we will report it to the GrGen developers. Unfortunately I cannot think of a workaround that will solve this problem immediately besides using parallel opposing directed edges instead of undirected ones.
If you find any other workaround let us know!
You must be logged in to reply to this topic.