Constant broccoli::build::DEFAULT_NUMBER_ELEM_PER_NODE[][src]

pub const DEFAULT_NUMBER_ELEM_PER_NODE: usize = 32;
Expand description

The default number of elements per node

If we had a node per bot, the tree would have too many levels. Too much time would be spent recursing. If we had too many bots per node, you would lose the properties of a tree, and end up with plain sweep and prune. Theory would tell you to just make a node per bot, but there is a sweet spot inbetween determined by the real-word properties of your computer. we want each node to have space for around num_per_node bots. there are 2^h nodes. 2^h*200>=num_bots. Solve for h s.t. h is an integer. Make this number too small, and the tree will have too many levels, and too much time will be spent recursing. Make this number too high, and you will lose the properties of a tree, and you will end up with just sweep and prune. This number was chosen emprically from running the Tree_alg_data project, on two different machines.