|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExternalProbabilityTest
Interface to enable interaction between a ProbabilityProxyTest
and another test external to the framework. Only two methods need to be
implemented like in the example below:
public class MyExternalTest implements ExternalBooleanTest {
// Constructor should not require any parameters
public MyExternalTest() throws TestInitializationException {
public DataType[] getParametersDataTypes() {
// Specify number of parameters with expected data types
return new DataType[] { DataType.STRING, DataType.DOUBLE... };
}
public Double getProbability( List parameters ) throws TestProcessingException {
// Get parameters in expected order
String param1 = (String)parameters.get( 0 );
Double param2 = (Double)parameters.get( 1 );
...
// Perform some test, usually based on some model
if ( my_model_has_data_for_the_parameters ) {
return new Double( response_from_model ); // response should be between 0 and 1
}
else {
return null;
}
}
}
| Method Summary | |
|---|---|
DataType[] |
getParametersDataTypes()
Returns an array where each element indicates the data type of the corresponding parameter. |
java.lang.Double |
getProbability(java.util.List parameters)
Returns a probability value for the given parameters. |
| Method Detail |
|---|
DataType[] getParametersDataTypes()
Returns an array where each element indicates the data type of the corresponding parameter.
java.lang.Double getProbability(java.util.List parameters)
throws TestProcessingException
Returns a probability value for the given parameters. For now, it is assumed that people should implicitly know which parameters need to be passed to this method according to each individual implementation.
parameters - List with parameter values.
TestProcessingException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||