fix: switch naming of nodes in dot to just values
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
25ace54553
commit
b0b712b2f6
1 changed files with 5 additions and 6 deletions
|
@ -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)}"]`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue