public class BananaTree<A extends Agent<?>,L extends Link> extends java.lang.Object implements Connector<A>
"An (n,k)-banana tree, as defined by Chen et al. (1997), is a graph obtained by connecting one leaf of each of n copies of an k-star graph with a single root vertex that is distinct from all the stars."
A Banana can be centered, whereby each star is connected to the main node via its center rather than via one of the leaves of the star. By default it is not centered.
Constructor and Description |
---|
BananaTree(java.lang.Class<L> linkClass,
SerializableBiConsumer<A,L> dataInjector,
int nbStars) |
Modifier and Type | Method and Description |
---|---|
BananaTree<A,L> |
centered() |
void |
connectAgent(A agent,
GroupInformation sourceInfo,
GroupInformation targetInfo)
The method that creates links between the agent whose `agentInit` is in charge of.
|
BananaTree<A,L> |
uncentered() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createLink, createLinks
public BananaTree(java.lang.Class<L> linkClass, SerializableBiConsumer<A,L> dataInjector, int nbStars)
public BananaTree<A,L> centered()
public BananaTree<A,L> uncentered()
public void connectAgent(A agent, GroupInformation sourceInfo, GroupInformation targetInfo)
Connector
connectAgent
in interface Connector<A extends Agent<?>>
agent
- : the agent to be connected. Links are to be added directly to this agent.sourceInfo
- : information of the source grouptargetInfo
- : information of the target group