MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / find

Method find

docling/utils/layout_postprocessor.py:22–25  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

20 self.rank = {elem: 0 for elem in elements}
21
22 def find(self, x):
23 if self.parent[x] != x:
24 self.parent[x] = self.find(self.parent[x]) # Path compression
25 return self.parent[x]
26
27 def union(self, x, y):
28 root_x, root_y = self.find(x), self.find(y)

Callers 15

unionMethod · 0.95
get_groupsMethod · 0.95
add_logos_to_poster_codeFunction · 0.45
get_final_answerMethod · 0.45
get_direct_textMethod · 0.45
handle_listitemMethod · 0.45
handle_tableMethod · 0.45
get_list_textMethod · 0.45
handle_figureMethod · 0.45
walk_linearMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected