void PointTree::build(std::vector<Point>& pts) { int level = 0; root = createLeafNodes(pts); while (root.size() > BRANCH_FACTOR) { root = sortTile(root, level++); } //printf("%d %d %d\n", sizeof(Point), sizeof(BranchNode), sizeof(LeafNode)); }
int main(int argc, char *argv[]){ if(argc == 3){ LINKEDLIST *list1 = new_list(); LINKEDLIST *list2 = new_list(); list2 = createLeafNodes(argv[1],list2); list1 = criaHuff_tree(list2); compressFILE(argv[1],argv[2],list1); free(list1); free(list2); }else{ uncompressFILE(argv[1]); } return 0; }