maximum depth of subtrees including self
(self)
| 55 | return 0.0 |
| 56 | |
| 57 | def get_max_depth(self): |
| 58 | ''' |
| 59 | maximum depth of subtrees including self |
| 60 | ''' |
| 61 | max_depth = 0 |
| 62 | for child in self.children: |
| 63 | max_depth = max(max_depth,child.get_max_depth()) |
| 64 | return max_depth + 1 |
| 65 | |
| 66 | def get_depth(self): |
| 67 | if self.father == None: |