* Computes node's total weight.
()
| 1188 | * Computes node's total weight. |
| 1189 | */ |
| 1190 | computeTotalWeight() { |
| 1191 | let totalWeight = this.selfWeight; |
| 1192 | this.forEachChild(function (child) { |
| 1193 | totalWeight += child.computeTotalWeight(); |
| 1194 | }); |
| 1195 | return this.totalWeight = totalWeight; |
| 1196 | } |
| 1197 | |
| 1198 | /** |
| 1199 | * Returns all node's children as an array. |
no test coverage detected