How to traverse all the nodes stored in one global accumulator and extract the edges between two adjacent nodes and store them in another global accumulator?
The format of the accumulator is：ListAccum@@path;There are several dot characters stored in it, and I want to extract all the edges between these dots.And store these edges in SetAccum@@edge.
Can you show the full definition of your ListAccum? What is the data type of the elements in your list?
I assumed that you have ListAccum.
Can you show an example of what you mean by “several dot characters stored in it, and I want to extract all the edges between these dots.”
First, thank you for your reply. I defined a ListAccum @path_list and a SetAccum @@edge_set in the query; Through my query logic, I stored some node IDs in the graph I defined in the ListAccum @path_list; , as shown in the figure below. Of course, these nodes are connected by edges. Now I want to store the information of each edge between these nodes in SetAccum @@edge_set, including various attributes of edges, starting nodes, ending nodes and so on. What should I do?
The vertex ID is one of the attributes of the node
For example, I want to find an edge between the node with ID 1 and the node with ID 4 and store it in @@edge.