|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Optimizer<A extends HObject,B extends HObject,GroupA extends GenericGroup<A,?>,GroupB extends GenericGroup<B,?>>
Determines which beings are compared and potentially interacted by Interactor
.
Unoptimized interactions check all members of A against all the members of B (order n^2).
Optimizers allow for the creation of data structures which will speed interactions.
Group B is given as argument to constructor and organized according to optimizer type. Detect checks body A against the structure formed from Group B.
Sample advanced optimizers include quadtree.
Method Summary | |
---|---|
void |
detect(GroupA group1,
GroupB group2,
InteractionHandler<A,B> handler)
This should detect all possible interactions between the members of groups A and B, using handler. |
Method Detail |
---|
void detect(GroupA group1, GroupB group2, InteractionHandler<A,B> handler)
group1
- a group of beingsgroup2
- a group of beingshandler
- interaction handler that will detect and handle interactions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |