edu.wpi.prc.templates.java.science
Class ScienceDataProcessor
java.lang.Object
edu.wpi.prc.templates.java.science.ScienceDataProcessor
public class ScienceDataProcessor
- extends java.lang.Object
The ScienceDataProcessor contains all of the project-specific methods
required to compute the results for work units. This class is used
by the ComputeThread.
- Author:
- James Baldassari
Constructor Summary |
ScienceDataProcessor(byte[] workUnitData)
Constructor that takes a byte array representing the
work unit data to be processed. |
Method Summary |
byte[] |
computeResult()
This method checks for previously saved checkpoints, then runs the
science algorithm. |
private void |
scienceAlgorithm()
This is the science algorithm. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workUnitData
private byte[] workUnitData
ScienceDataProcessor
public ScienceDataProcessor(byte[] workUnitData)
- Constructor that takes a byte array representing the
work unit data to be processed.
- Parameters:
workUnitData
- The work unit data.
computeResult
public byte[] computeResult()
- This method checks for previously saved checkpoints, then runs the
science algorithm. It then converts the result into a byte array,
which will be returned to the server.
- Returns:
- Returns a byte array representing the computed result.
scienceAlgorithm
private void scienceAlgorithm()
- This is the science algorithm.