MCPcopy Create free account
hub / github.com/nodejs/node / getRankSets

Method getRankSets

deps/v8/tools/turbolizer/src/graph-layout.ts:176–190  ·  view source on GitHub ↗
(showTypes: boolean)

Source from the content-addressed store, hash-verified

174 }
175
176 private getRankSets(showTypes: boolean): Array<Array<GraphNode>> {
177 const rankSets = new Array<Array<GraphNode>>();
178 for (const node of this.graph.nodes()) {
179 node.y = node.rank * (C.DEFAULT_NODE_ROW_SEPARATION +
180 node.getHeight(showTypes) + 2 * C.DEFAULT_NODE_BUBBLE_RADIUS);
181 if (node.visible) {
182 if (!rankSets[node.rank]) {
183 rankSets[node.rank] = new Array<GraphNode>(node);
184 } else {
185 rankSets[node.rank].push(node);
186 }
187 }
188 }
189 return rankSets;
190 }
191
192 private placeNodes(rankSets: Array<Array<GraphNode>>, showTypes: boolean): void {
193 // Iterate backwards from highest to lowest rank, placing nodes so that they

Callers 1

fullRebuildMethod · 0.95

Calls 3

nodesMethod · 0.45
getHeightMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected