magikker / TreeHouse-Private

TreeHouse development.
GNU General Public License v3.0
0 stars 0 forks source link

Remove Most Global Variables. #3

Closed magikker closed 11 years ago

magikker commented 11 years ago

TreeHouse inherited a bunch of global variables from the TreeZip project.

NUM_TREES, NUM_TAXA, LM and similar were fine when we were only dealing with one set of trees at a time. They're getting in the way now that I'd like to deal with multiple sets. Completion of this may require some modifications to the TreeZip code as well.

It will allow us to keep multiple bipartition tables in memory. This is needed to handle taxa_masking, and random_bipartition_tables which are in the works for the summer of 2013.

magikker commented 11 years ago

NUM_TAXA should be replaced with the size of the label map

NUM_TREES needs to be a var somewhere in the biparittion table.

Need to cut ties with gobal.h

magikker commented 11 years ago

Treesets are no longer aware of the total number of trees in the system. Previously you could not define a treeset to include trees that weren't in the treeset. But if we've got multiple bipartition tables loaded (which is where this is headed) it doesn't make sense for us to place that sort of limit on treeset declaration. This may get revisited with a smarter implementation once we can load multiple sets, but for now it's gone.