Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Quadtree::idealPrune (int numLeaves) const
- {
- if (root==NULL || numLeaves>(root->res*root->res))
- return 0;
- else
- return idealsambar(numLeaves, 876858, 0);
- }
- int Quadtree::idealsambar(int leaves,int max, int min)const
- {
- int appa=(max+min)/2;
- if (pruneSize(appa)>numLeaves)
- return idealsambar(leaves, max,appa+1);
- if (min>=max)
- return min;
- else
- return idealsambar(leaves, appa, min);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement