Edge List Vertex Renaming Tool
Rename all observed edge endpoints with an explicit injective complete mapping; no vertex merging or inferred aliases.
Description
Rename all observed edge endpoints with an explicit injective complete mapping; no vertex merging or inferred aliases.
Renaming vertices consistently requires a total one-to-one mapping over observed endpoint labels.
When to use this tool
Rename all observed edge endpoints with an explicit injective complete mapping; no vertex merging or inferred aliases.
- Prepare the supplied edgesJson, mappingJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter edgesJson, mappingJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.edges. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse mappingJson from/to records with unique source and destination labels. Require every observed vertex to have a mapping, then replace both edge endpoints and preserve ID/weight.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| edgesJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
| mappingJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "edgesJson",
"decoded": [
{
"id": "a",
"source": "u",
"target": "v",
"weight": 2
},
{
"id": "b",
"source": "v",
"target": "u",
"weight": 4
},
{
"id": "c",
"source": "u",
"target": "u",
"weight": 1
}
]
},
{
"field": "mappingJson",
"decoded": [
{
"from": "u",
"to": "x"
},
{
"from": "v",
"to": "y"
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.edges | The edges list in the ordering and representation described above. |
{
"input": {
"edgesJson": "[{\"id\":\"a\",\"source\":\"u\",\"target\":\"v\",\"weight\":2},{\"id\":\"b\",\"source\":\"v\",\"target\":\"u\",\"weight\":4},{\"id\":\"c\",\"source\":\"u\",\"target\":\"u\",\"weight\":1}]",
"mappingJson": "[{\"from\":\"u\",\"to\":\"x\"},{\"from\":\"v\",\"to\":\"y\"}]"
},
"output": {
"result": {
"edges": [
{
"id": "a",
"source": "x",
"target": "y",
"weight": 2
},
{
"id": "b",
"source": "y",
"target": "x",
"weight": 4
},
{
"id": "c",
"source": "x",
"target": "x",
"weight": 1
}
]
}
}
} Limitations and assumptions
- Unused extra mappings are allowed. The tool does not rename external graph storage or permit many-to-one vertex merging.
- Every edge record requires unique string id, string source/target and finite numeric weight, even when this operation does not use the weight. Parallel endpoints and loops are retained unless explicitly filtered.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Choose edge identities, directedness and vertex coverage explicitly. Local edge-list audits and transformations do not replace a graph algorithm with the required connectivity, path or ordering guarantees.
References
Similar or alternative tools
- Edge ID Trail Validity Check
Verify an edge-ID trail with no repeated edge occurrences from an explicit start; directed or undirected traversal, with failure indexes retained.
- Edge List Boundary Cut Selector
Select edges crossing an explicit vertex-set boundary using endpoint exclusive membership; direction and occurrence IDs remain intact.