This commit is contained in:
Gianpaolo Coro 2012-09-27 09:07:45 +00:00
parent 2166ea5b3c
commit 3a55d1c0f3
6 changed files with 36 additions and 8 deletions

View File

@ -24,6 +24,11 @@ public class ClusterersFactory {
return inputs;
}
public static String getDescription(String configPath, String algorithmName) throws Exception{
String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.clusterersFile, algorithmName);
return input;
}
public static List<Clusterer> getClusterers(AlgorithmConfiguration config) throws Exception {
List<Clusterer> clusterers = new ArrayList<Clusterer>();
clusterers.add(getClusterer(config));

View File

@ -25,6 +25,11 @@ public class EvaluatorsFactory {
return inputs;
}
public static String getDescription(String configPath, String algorithmName) throws Exception{
String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.evaluatorsFile, algorithmName);
return input;
}
public static List<Evaluator> getEvaluators(AlgorithmConfiguration config) throws Exception {
List<Evaluator> evaluators = new ArrayList<Evaluator>();
evaluators.add(getEvaluator(config));

View File

@ -66,7 +66,10 @@ public class GeneratorsFactory {
return gens;
}
public static String getDescription(String configPath, String algorithmName) throws Exception{
String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.algorithmsFile, algorithmName);
return input;
}
public static List<StatisticalType> getAlgorithmParameters(String configPath, String algorithmName) throws Exception{
List<StatisticalType> inputs = ProcessorsFactory.getParameters(configPath + AlgorithmConfiguration.algorithmsFile, algorithmName);

View File

@ -35,6 +35,10 @@ public class ModelersFactory {
return inputs;
}
public static String getDescription(String configPath, String algorithmName) throws Exception{
String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.modelsFile, algorithmName);
return input;
}
public static List<Modeler> getModelers(AlgorithmConfiguration config) throws Exception {

View File

@ -25,6 +25,11 @@ public class TransducerersFactory {
return inputs;
}
public static String getDescription(String configPath, String algorithmName) throws Exception{
String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.transducererFile, algorithmName);
return input;
}
public static List<Transducerer> getTransducerers(AlgorithmConfiguration config) throws Exception {
List<Transducerer> clusterers = new ArrayList<Transducerer>();
clusterers.add(getTransducerer(config));

View File

@ -25,8 +25,9 @@ public class TestsMetaInfo {
public static void main(String[] args) throws Exception {
System.out.println("***TEST 1 - Get Generation Algorithm Parameters***");
List<StatisticalType> map = GeneratorsFactory.getAlgorithmParameters("./cfg/","DUMMY");
System.out.println("input for DUMMY algorithm: "+map);
List<StatisticalType> map;
// List<StatisticalType> map = GeneratorsFactory.getAlgorithmParameters("./cfg/","DUMMY");
// System.out.println("input for DUMMY algorithm: "+map);
map = GeneratorsFactory.getAlgorithmParameters("./cfg/","AQUAMAPS_SUITABLE");
System.out.println("input for AQUAMAPS_SUITABLE algorithm: "+map);
@ -78,19 +79,24 @@ public static void main(String[] args) throws Exception {
System.out.println("Clusterers Params: "+map);
System.out.println("\n***TEST 15- Get Clusterers with a config***");
List<Clusterer> clus = ClusterersFactory.getClusterers(testConfigClusterer());
System.out.println("Clusterers list: "+clus);
// List<Clusterer> clus = ClusterersFactory.getClusterers(testConfigClusterer());
// System.out.println("Clusterers list: "+clus);
System.out.println("\n***TEST 16- Get All Transducerers***");
System.out.println("All Transducers: "+TransducerersFactory.getAllTransducerers("./cfg/"));
System.out.println("\n***TEST 17- Get Transducerers Parameters ***");
map = TransducerersFactory.getTransducerParameters("./cfg/","TESTTRANS");
map = TransducerersFactory.getTransducerParameters("./cfg/","BIOCLIMATE_HSPEC");
System.out.println("Transducerers Params: "+map);
System.out.println("\n***TEST 18- Get Transducerers with a config***");
List<Transducerer> trans = TransducerersFactory.getTransducerers(testConfigTrans());
System.out.println("Transducerers list: "+trans);
// List<Transducerer> trans = TransducerersFactory.getTransducerers(testConfigTrans());
// System.out.println("Transducerers list: "+trans);
System.out.println("\n***TEST 19- Get Agent Description***");
String desc = ClusterersFactory.getDescription("./cfg/","DBSCAN");
System.out.println("DESCRIPTION: "+desc);
int cores = Runtime.getRuntime().availableProcessors();
System.out.println("Number of cores: "+cores);