|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.larvalabs.starfish.algorithm.Algorithm
Base class for all problems.
| Constructor Summary | |
Algorithm()
|
|
| Method Summary | |
java.lang.String |
describeSegment(int segmentNum)
Override this if you wish to describe specific segments |
void |
generateSegmentInputData(SegmentInputData segmentInputData)
Override to generate the input data for each segment. |
abstract java.lang.String |
getName()
Returns the name of this algorithm. |
void |
initialize(Parameters parameters)
Override this to initialize the Algorithm for the problem described by the included parameters. |
boolean |
nonNullSegmentResultMeansCompleted()
Override and return true to indicate that if your Algorithm returns a non null result from processSegment() then that indicates processing on the problem is complete and the answer has been found. |
abstract ProblemResult |
processResults(Uuid[] resultIds,
Resources resources)
Process the array of resultIds provided by the grid. |
abstract java.io.Serializable |
processSegment(int segmentNum,
java.lang.Object segmentParams)
Process one segment of the problem. |
abstract void |
setParameters(ParameterSet parameterSet)
This method is called to allow the algorithm to specify its parameters. |
abstract int |
totalNumberOfSegments()
Return total number of segments this Algorithm will produce to solve the Problem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Algorithm()
| Method Detail |
public abstract void setParameters(ParameterSet parameterSet)
parameterSet - public void initialize(Parameters parameters)
parameters - public abstract java.lang.String getName()
public boolean nonNullSegmentResultMeansCompleted()
public abstract java.io.Serializable processSegment(int segmentNum,
java.lang.Object segmentParams)
segmentNum -
public java.lang.String describeSegment(int segmentNum)
segmentNum -
public abstract int totalNumberOfSegments()
public void generateSegmentInputData(SegmentInputData segmentInputData)
public abstract ProblemResult processResults(Uuid[] resultIds,
Resources resources)
resultIds - A list of UUID's for the resultIds generated by processSegment()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||