Reconstruct node from subnodes. Parameters ---------- update : bool, optional If True, then reconstructed data replaces the current node data (default: False). Returns: - original node data if subnodes do not exist
(self, update=False)
| 190 | raise NotImplementedError() |
| 191 | |
| 192 | def reconstruct(self, update=False): |
| 193 | """ |
| 194 | Reconstruct node from subnodes. |
| 195 | |
| 196 | Parameters |
| 197 | ---------- |
| 198 | update : bool, optional |
| 199 | If True, then reconstructed data replaces the current |
| 200 | node data (default: False). |
| 201 | |
| 202 | Returns: |
| 203 | - original node data if subnodes do not exist |
| 204 | - IDWT of subnodes otherwise. |
| 205 | """ |
| 206 | if not self.has_any_subnode: |
| 207 | return self.data |
| 208 | return self._reconstruct(update) |
| 209 | |
| 210 | def _reconstruct(self): |
| 211 | raise NotImplementedError() # override this in subclasses |
no test coverage detected