jbil.common
Interface Algorithm

All Known Implementing Classes:
AbstractAlgorithm, GibbsMotifSiteSampler

public interface Algorithm

Classes implementing this interface behave as algorithms. An algorithm receives inputs associated to unique names, runs, and produce outputs also associated to unique names.

Author:
Paulo G. S. da Fonseca

Method Summary
 java.lang.Object getInput(java.lang.String name)
          Get the input value associated to a name.
 java.lang.Object getOutput(java.lang.String name)
          Gets an output of the algorithm from its name.
 void run()
          Executes the algorithm once.
 void setInput(java.lang.String name, java.lang.Object value)
          Sets an input to the algorithm.
 void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)
          Sets multiple inputs to the algorithm.
 

Method Detail

getInput

java.lang.Object getInput(java.lang.String name)
Get the input value associated to a name.

Parameters:
name - The name of the input

setInput

void setInput(java.lang.String name,
              java.lang.Object value)
Sets an input to the algorithm.

Parameters:
name - The name of the input.
value - The value of the input.

setInputs

void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)
Sets multiple inputs to the algorithm.

Parameters:
inputs - A map associating the names of the inputs to their values.

getOutput

java.lang.Object getOutput(java.lang.String name)
Gets an output of the algorithm from its name.

Parameters:
name - The name of the output.

run

void run()
Executes the algorithm once.