edu.gwu.champAlg
Interface Algorithm

All Known Subinterfaces:
ChessAlgorithm, TicTacToeAlgorithm

public interface Algorithm

Interface Algorithm is the top-level interface from which is derived specific interfaces for particular algorithms. Thus, a sorting algorithm will implement an interface derived from this one.


Method Summary
 java.lang.String getName()
          getName should return your name and the name of your algorithm, e.g., "Simha's TSP heuristic".
 void setPropertyExtractor(int algID, PropertyExtractor prop)
          setPropertyExtractor will be called by the simulator with an instance of PropertyExtractor which an algorithm can use to extract properties from the original properties file.
 java.lang.String toString()
          toString() should return short version of your name and the name of your algorithm, with no blanks (for use in output filenames), e.g., "SimhaTSPheur".
 

Method Detail

getName

java.lang.String getName()
getName should return your name and the name of your algorithm, e.g., "Simha's TSP heuristic".

Returns:
a String value

toString

java.lang.String toString()
toString() should return short version of your name and the name of your algorithm, with no blanks (for use in output filenames), e.g., "SimhaTSPheur".

Overrides:
toString in class java.lang.Object
Returns:
a String value

setPropertyExtractor

void setPropertyExtractor(int algID,
                          PropertyExtractor prop)
setPropertyExtractor will be called by the simulator with an instance of PropertyExtractor which an algorithm can use to extract properties from the original properties file.

Parameters:
algID - an int value - the ID assigned to the algorithm so that algorithm-specific properties can be extracted from the property file.
prop - a PropertyExtractor value