@@ -84,14 +84,14 @@ <h2 id="returns">Returns</h2>
8484< p > A centered string representation of val</ p > </ div >
8585</ dd >
8686< dt id ="printBin.getDepth "> < code class ="name flex ">
87- < span > def < span class ="ident "> getDepth</ span > </ span > (< span > node: < a title ="printBin.Node " href ="#printBin.Node " > Node </ a > )</ span >
87+ < span > def < span class ="ident "> getDepth</ span > </ span > (< span > node: < a title ="printBin.BinaryNode " href ="#printBin.BinaryNode " > BinaryNode </ a > )</ span >
8888</ code > </ dt >
8989< dd >
9090< details class ="source ">
9191< summary >
9292< span > Expand source code</ span >
9393</ summary >
94- < pre > < code class ="python "> def getDepth(node: Node ):
94+ < pre > < code class ="python "> def getDepth(node: BinaryNode ):
9595 """
9696 Calculates the depth (height) of a binary tree.
9797
@@ -115,14 +115,14 @@ <h2 id="returns">Returns</h2>
115115< p > The depth of the tree (number of levels from root to deepest leaf)</ p > </ div >
116116</ dd >
117117< dt id ="printBin.nodeToMat "> < code class ="name flex ">
118- < span > def < span class ="ident "> nodeToMat</ span > </ span > (< span > node: < a title ="printBin.Node " href ="#printBin.Node " > Node </ a > ,< br > depth=-1,< br > fillChar=None,< br > unitSize=None,< br > removeEmpty=True)</ span >
118+ < span > def < span class ="ident "> nodeToMat</ span > </ span > (< span > node: < a title ="printBin.BinaryNode " href ="#printBin.BinaryNode " > BinaryNode </ a > ,< br > depth=-1,< br > fillChar=None,< br > unitSize=None,< br > removeEmpty=True)</ span >
119119</ code > </ dt >
120120< dd >
121121< details class ="source ">
122122< summary >
123123< span > Expand source code</ span >
124124</ summary >
125- < pre > < code class ="python "> def nodeToMat(node: Node , depth=-1, fillChar=None, unitSize=None, removeEmpty=True):
125+ < pre > < code class ="python "> def nodeToMat(node: BinaryNode , depth=-1, fillChar=None, unitSize=None, removeEmpty=True):
126126 """
127127 Converts a binary tree into a 2D matrix representation for visualization.
128128
@@ -219,14 +219,14 @@ <h2 id="returns">Returns</h2>
219219< p > A 2D list (matrix) representing the tree structure</ p > </ div >
220220</ dd >
221221< dt id ="printBin.nodeToString "> < code class ="name flex ">
222- < span > def < span class ="ident "> nodeToString</ span > </ span > (< span > node: < a title ="printBin.Node " href ="#printBin.Node " > Node </ a > ,< br > depth=-1,< br > fillChar=None,< br > unitSize=None,< br > removeEmpty=True)</ span >
222+ < span > def < span class ="ident "> nodeToString</ span > </ span > (< span > node: < a title ="printBin.BinaryNode " href ="#printBin.BinaryNode " > BinaryNode </ a > ,< br > depth=-1,< br > fillChar=None,< br > unitSize=None,< br > removeEmpty=True)</ span >
223223</ code > </ dt >
224224< dd >
225225< details class ="source ">
226226< summary >
227227< span > Expand source code</ span >
228228</ summary >
229- < pre > < code class ="python "> def nodeToString(node: Node , depth=-1, fillChar=None, unitSize=None, removeEmpty=True):
229+ < pre > < code class ="python "> def nodeToString(node: BinaryNode , depth=-1, fillChar=None, unitSize=None, removeEmpty=True):
230230 """
231231 Converts a binary tree into a string representation for visualization.
232232
@@ -261,14 +261,14 @@ <h2 id="returns">Returns</h2>
261261< p > A string representation of the tree with each row on a new line</ p > </ div >
262262</ dd >
263263< dt id ="printBin.register "> < code class ="name flex ">
264- < span > def < span class ="ident "> register</ span > </ span > (< span > node: < a title ="printBin.Node " href ="#printBin.Node " > Node </ a > ,< br > fillChar=None,< br > unitSize=None,< br > code='',< br > mem=None)</ span >
264+ < span > def < span class ="ident "> register</ span > </ span > (< span > node: < a title ="printBin.BinaryNode " href ="#printBin.BinaryNode " > BinaryNode </ a > ,< br > fillChar=None,< br > unitSize=None,< br > code='',< br > mem=None)</ span >
265265</ code > </ dt >
266266< dd >
267267< details class ="source ">
268268< summary >
269269< span > Expand source code</ span >
270270</ summary >
271- < pre > < code class ="python "> def register(node: Node , fillChar=None, unitSize=None, code="", mem=None):
271+ < pre > < code class ="python "> def register(node: BinaryNode , fillChar=None, unitSize=None, code="", mem=None):
272272 """
273273 Recursively registers all nodes in a tree with their binary path codes.
274274
@@ -316,16 +316,16 @@ <h2 id="args">Args</h2>
316316< section >
317317< h2 class ="section-title " id ="header-classes "> Classes</ h2 >
318318< dl >
319- < dt id ="printBin.Node "> < code class ="flex name class ">
320- < span > class < span class ="ident "> Node </ span > </ span >
319+ < dt id ="printBin.BinaryNode "> < code class ="flex name class ">
320+ < span > class < span class ="ident "> BinaryNode </ span > </ span >
321321< span > (</ span > < span > val=0, left=None, right=None)</ span >
322322</ code > </ dt >
323323< dd >
324324< details class ="source ">
325325< summary >
326326< span > Expand source code</ span >
327327</ summary >
328- < pre > < code class ="python "> class Node :
328+ < pre > < code class ="python "> class BinaryNode :
329329 """
330330 Represents a node in a binary tree.
331331
@@ -376,7 +376,7 @@ <h2 id="attributes">Attributes</h2>
376376< li > < h3 > < a href ="#header-classes "> Classes</ a > </ h3 >
377377< ul >
378378< li >
379- < h4 > < code > < a title ="printBin.Node " href ="#printBin.Node " > Node </ a > </ code > </ h4 >
379+ < h4 > < code > < a title ="printBin.BinaryNode " href ="#printBin.BinaryNode " > BinaryNode </ a > </ code > </ h4 >
380380</ li >
381381</ ul >
382382</ li >
0 commit comments