Package application.model.search.rulesrc
Class RuleSearch
java.lang.Object
application.model.search.SearchProgram
application.model.search.rulesrc.RuleSearch
public class RuleSearch extends SearchProgram
Implements CAViewer's rule search program - rulesrc
-
Field Summary
Fields inherited from class application.model.search.SearchProgram
executor, numSearched, searchParameters, searchResults, stop
-
Constructor Summary
Constructors Constructor Description RuleSearch(RuleSearchParameters parameters)
Constructs the rulesrc program -
Method Summary
Modifier and Type Method Description void
search(int numRules)
Searches numRules for a spaceship / oscillator that matches the target patternboolean
writeToFile(java.io.File file)
Writes the search results to a fileMethods inherited from class application.model.search.SearchProgram
add, add, getNumSearched, getSearchParameters, getSearchResults, searchThreaded, terminateSearch
-
Constructor Details
-
RuleSearch
Constructs the rulesrc program- Parameters:
parameters
- The parameters of the search
-
-
Method Details
-
search
public void search(int numRules) throws java.lang.IllegalArgumentExceptionSearches numRules for a spaceship / oscillator that matches the target pattern- Specified by:
search
in classSearchProgram
- Parameters:
numRules
- The number of rules to search- Throws:
java.lang.IllegalArgumentException
- Thrown if the search parameters are invalid
-
writeToFile
public boolean writeToFile(java.io.File file)Description copied from class:SearchProgram
Writes the search results to a file- Specified by:
writeToFile
in classSearchProgram
- Parameters:
file
- The file to write the search results to- Returns:
- Returns true if successful, false if unsuccessful
-