Method to get total number of HTM pixels
parejkoj opened this issue · comments
John Parejko commented
A useful addition would be a method to get the total number of HTM pixels for a given depth. I think it would look like this:
def get_n_pixels(self):
"""Return the total number of pixels for this HTM's depth."""
return 4**self.get_depth()
but I had to work that out from the existing code. This is useful for knowing how many files you might generate with a given indexing scheme.
Erin Sheldon commented
according to Szalay et al. https://arxiv.org/abs/cs/0701164 the number of nodes is
8 * 4**(depth-1)