Is it possible to obtain the in-neighbors (predecessors) for a given vertex?

I need it because I want to implement SimRank in GSQL: https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.similarity.simrank_similarity.html

which needs to calculate the in-neighbors for a pair of vertices, recursively.

If you declare all your directed edges as also having a reverse edge, you can use the *outdegree()* function to mimic the functionality of *indegree()*, which is not a function that actually exists in GSQL.

**v.outdegree(“reverse_DIRECTED_EDGE”)** is analogous to **v.indegree(“DIRECTED_EDGE”)**

In GSQL, the edge declaration would look like this:

```
CREATE DIRECTED EDGE DIRECTED_EDGE (FROM vType1, TO vType2)
WITH REVERSE_EDGE="reverse_DIRECTED_EDGE"
```

If you are working with undirected edges, then in-neighbors and out-neighbors are the same thing.

See *outdegree()* documentation

So I assume there is no possible way in Tigergraph so far to obtain in-neighbors of vertices in a directed graph whose edges have not been declared as “reverse_DIRECTED_EDGE”. Is that correct?

By extension I also I assume that implementation of algorithms such as SimRank are not possible for now. Is there any way of suggesting a feature to obtain in-neighbors of a given vertex in a directed graph, even if no “reverse_DIRECTED_EDGE” edges have been defined?