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;
|
||||
}
|
||||
|
||||
result.push(
|
||||
`\t"${node.toString()}" [label="${node.value}, ${node.rank}"];`
|
||||
);
|
||||
let [value, rank] = [node.value, node.rank];
|
||||
result.push(`\t"Node(${value})" [label="${value}, ${rank}"];`);
|
||||
|
||||
[node.left, node.right]
|
||||
.filter((child) => child)
|
||||
|
@ -52,9 +51,9 @@ class RankedTree {
|
|||
edges.forEach((vertices) => {
|
||||
let [u, v] = vertices;
|
||||
result.push(
|
||||
`\t"${u.toString()}" -> "${v.toString()}" [label="${nodeDifference(
|
||||
v
|
||||
)}"]`
|
||||
`\t"Node(${u.value})" -> "Node(${
|
||||
v.value
|
||||
})" [label="${nodeDifference(v)}"]`
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue