Description
Collect every zero-based position where a walk entry equals vertex and return positions and their count.
A walk is an ordered sequence of visited vertices or edges, while a path normally adds structural restrictions. Sequence manipulation and endpoint checks alone do not verify that every required graph edge exists.
Collect every zero-based position where a walk entry equals vertex and return positions and their count.
When to use this tool
Use Graph Walk Vertex Occurrence Position when you need a sequence transformation, endpoint comparison, or path-related local calculation.
How to use the tool and how it works
- Enter walk, vertex. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read positions, occurrences. Use the output convention below.
Collect every zero-based position where a walk entry equals vertex and return positions and their count.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| walk | Walk | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| vertex | Vertex | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| positions | Positions | Required. Array of safe integer; maximum items 256. |
| occurrences | Occurrences | Required. Safe integer. |
{
"input": {
"walk": [
"a",
"b",
"a",
"c"
],
"vertex": "a"
},
"output": {
"positions": [
0,
2
],
"occurrences": 2
}
} Limitations and assumptions
- Matching is literal and repeated visits are retained; no edges, walk validity, path simplicity, graph membership, or reachability are verified.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Validate each consecutive edge against the graph and check the required path or cycle properties. Use a dedicated traversal or shortest-path algorithm when reachability or optimality is the real question.
References
Similar or alternative tools
- Graph Path Reversal Oriented Edge Sign
Reverse the list order and negate each sign.
- Disconnected Distance Infinity Token
Return its numeric String when reachable, otherwise text ∞ and finite false.