|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.sim.PmBase<V,E>
bcds.phison.multfailures.PmElemsSequencer<V,E>
public class PmElemsSequencer<V,E>
This module loads an ElemsSequencer, whose name is provided by the user, and prints to stdout the list of elements (either nodes or links) in the order determined by the sequencer.
Elements are always printed one per line. For nodes, the id is printed, as returned by node.toString(). For links, the two end-nodes are printed, separated by a space character.
Although this is a "processing module", it is intended to be used primarily alone. Thus, a typical way to invoke it through Sim from command-line is:
(cat <<END PmElemsSequencer.sequencer=SequencerDegree PmElemsSequencer.target=link END ) | java -jar lib/phison.jar Sim -env_file=- -stdm=false -q \ -num_rep=10 rep_out=some_file_{%d}.out -maxtime=1 \ -mp=bcds.phison.multfailures \ -modules=PmElemsSequencer \ mytopology.sgf
Field Summary | |
---|---|
java.lang.String |
DIRECTED
See getEnvParams() . |
java.lang.String |
SEQUENCER
See getEnvParams() . |
java.lang.String |
TARGET
See getEnvParams() . |
java.lang.String |
USE_RANDOM
See getEnvParams() . |
Constructor Summary | |
---|---|
PmElemsSequencer()
|
Method Summary | |
---|---|
java.lang.Object[] |
getEnvParams()
Returns the list of environment parameters and default values of this class. |
void |
setup(SimCore<V,E> sim)
Saves the parameter sim , which can later be obtained by
calling the sim() method. |
void |
shutdown()
Prints to System.out the elements (nodes or links) in the order determined by the selected sequencer. |
Methods inherited from class bcds.phison.sim.PmBase |
---|
ctx, env, getEnviron, getId, getName, opt, run, sim, stats |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.String SEQUENCER
getEnvParams()
.
public final java.lang.String TARGET
getEnvParams()
.
public final java.lang.String DIRECTED
getEnvParams()
.
public final java.lang.String USE_RANDOM
getEnvParams()
.
Constructor Detail |
---|
public PmElemsSequencer()
Method Detail |
---|
public void setup(SimCore<V,E> sim)
PmBase
sim
, which can later be obtained by
calling the sim() method. It also calls
adaptTypes if the environment object is non-null (which should
normally be).
setup
in interface ProcessingModule<V,E>
setup
in class PmBase<V,E>
public void shutdown()
shutdown
in interface ProcessingModule<V,E>
shutdown
in class PmBase<V,E>
public java.lang.Object[] getEnvParams()
sequencer
: Name of the class to be used as sequencer,
which must implement
ElemsSequencer
.
Default: bcds.phison.multfailures.SequencerRandom.
target
: The type of elements to work with: one of
node or link. Default: node.
directed
: The type of graph to work with: directed or
undirected. Default: false.
use_random
: Pass the sequencer a random number generator.
The effect and meaning of this decision depends
on each sequencer. Default: true.
getEnvParams
in interface WithEnvParams
getEnvParams
in class PmBase<V,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |