|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object peersim.reports.GraphObserver peersim.reports.BallExpansion
public class BallExpansion
Control to observe the ball expansion, that is, the number of nodes that are accessible from a given node in at most 1, 2, etc steps.
Parameter Summary | |
---|---|
maxd
This parameter defines the maximal distance we care about. |
|
n
The number of nodes to print info about. |
|
stats
If defined, statistics are printed instead over the minimal path lengths. |
Parameters inherited from class peersim.reports.GraphObserver |
---|
undir |
Field Summary |
---|
Fields inherited from class peersim.reports.GraphObserver |
---|
g, ga, name, pid, undir |
Constructor Summary | |
---|---|
BallExpansion(java.lang.String name)
Standard constructor that reads the configuration parameters. |
Method Summary | |
---|---|
boolean |
execute()
Prints information about ball expansion. |
Methods inherited from class peersim.reports.GraphObserver |
---|
updateGraph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parameter Detail |
---|
maxd
Defaults to the network size (which means all distances are taken into account). Note that this default is normally way too much; many low diameter graphs have only short distances between the nodes. Setting a short (but sufficient) distance saves memory. Also note that the initial network size is used if no value is given which might not be what you want if e.g. the network is growing.
n
stats
Constructor Detail |
---|
public BallExpansion(java.lang.String name)
name
- the configuration prefix for this classMethod Detail |
---|
public boolean execute()
IncrementalStats.toString()
, over the values of minimal
distances from the given number of nodes to all other nodes in the network.
If at least one node is unreachable from any selected starting node, then
the path length is taken as infinity and statistics are calculated
accordingly. In that case, IncrementalStats.getMaxCount()
returns
the number of nodes of "infinite distance", that is, the number of
unreachable nodes.
Otherwise one line is printed for all nodes we observe, containing the
number of nodes at distance 1, 2, etc, separated by spaces.
In this output format, unreachable nodes are simply ignored, but of course
the sum of the numbers in one line can be used to detect partitioning if
necessary.
Finally, note that the "n" nodes are not guaranteed to be the
same nodes over consecutive calls to this method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |