fix: switch naming of nodes in dot to just values

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-05-05 20:28:58 +02:00
parent 25ace54553
commit b0b712b2f6
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -35,9 +35,8 @@ class RankedTree {
continue; continue;
} }
result.push( let [value, rank] = [node.value, node.rank];
`\t"${node.toString()}" [label="${node.value}, ${node.rank}"];` result.push(`\t"Node(${value})" [label="${value}, ${rank}"];`);
);
[node.left, node.right] [node.left, node.right]
.filter((child) => child) .filter((child) => child)
@ -52,9 +51,9 @@ class RankedTree {
edges.forEach((vertices) => { edges.forEach((vertices) => {
let [u, v] = vertices; let [u, v] = vertices;
result.push( result.push(
`\t"${u.toString()}" -> "${v.toString()}" [label="${nodeDifference( `\t"Node(${u.value})" -> "Node(${
v v.value
)}"]` })" [label="${nodeDifference(v)}"]`
); );
}); });