So far, we have used the default configuration for the direction of the projected relationship. By default, it's the same as the Neo4j graph.
The difference between outgoing and incoming relations is illustrated in the next diagram. With respect to node A, the relationship with B is outgoing, meaning it starts from A and ends in B, while the relationship with C is incoming, meaning A is the end node:
In the GDS, you can always choose whether to use only outgoing or incoming relationships or use relationships in both directions. The last case allows you to treat your graph as undirected, whereas all Neo4j relationships have to be directed.
To illustrate this concept, let's add a new edge to our test graph:
MATCH (A:Node {name: "A"})
MATCH (C:Node {name: "C"})
MATCH (E:Node {name: "E"})
CREATE (C)-[:LINKED_TO {weight: 20}]->(A)
CREATE (E)-[:LINKED_TO {weight: 5}]->(C)
Our graph now looks like this:
Let&apos...